I want to set the dtypes of multiple columns in pd.Dataframe (I have a file that I\'ve had to manually parse into a list of lists, as the file was
For those coming from Google (etc.) such as myself:
convert_objects has been deprecated since 0.17 - if you use it, you get a warning like this one:
FutureWarning: convert_objects is deprecated. Use the data-type specific converters
pd.to_datetime, pd.to_timedelta and pd.to_numeric.
You should do something like the following:
df =df.astype(np.float) df["A"] =pd.to_numeric(df["A"])