How do i change multiple columns to a float when i also need to change , to.
DF looks like this except i dropped all the NAN values as i dont need those rows.
And this is the way im doing it now, but it takes hella long time. I know you can do a loop but i don't understand how.
Use df.iloc
:
df.iloc[:, 2:] = df.iloc[:, 2:].replace(',', '.', regex=True).astype(float)