The main problem I have right now is that DataFrame.quantile() doesn't work with Decimals.
I can convert my Dataframe to floats by using df.convert_objects(convert_numeric=True)
, but this generates a deprecation warning and the suggested replacement infer_objects()
doesn't work.
As an alternative, I could use Dataframe.round
on my input data instead of converting them to Decimals. I assume that this should be safe for direct comparisons (I am indexing on a column to subtract two dataframes from each other, e.g. df1.set_index('Time') - df2.set_index('Time')
) but I can't be certain.
You can apply pd.to_numeric
to an entire dataframe:
df = df.apply(pd.to_numeric, downcast='float')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With