Sep-14-2023, 02:48 AM
(This post was last modified: Sep-14-2023, 02:48 AM by deanhystad.)
You should try DataFrame.inver_objects()
https://pandas.pydata.org/docs/reference...jects.html
https://pandas.pydata.org/docs/reference...jects.html
Quote:Attempt to infer better dtypes for object columns.
Attempts soft conversion of object-dtyped columns, leaving non-object and unconvertible columns unchanged. The inference rules are the same as during normal Series/DataFrame construction.