I have a dataframe with some columns containing data of type object because of some funky data entries (aka a . or whatnot).
I have been able to correct this by identifying the object columns and then doing this:
obj_cols = df.loc[:, df.dtypes == object]
conv_cols = obj_cols.convert_objects(convert_numeric='force')
This works fine and allows me to run the regression I need, but generates this error:
FutureWarning: convert_objects is deprecated.
Is there a better way to do this so as to avoid the error? I also tried constructing a lambda function but that didn't work.