Pandas DataFrame: infer_objects() function
DataFrame - infer_objects() function
The infer_objects() function is used to 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.
Syntax:
DataFrame.infer_objects(self)
Returns: converted - same type as input object
Example:
Download the Pandas DataFrame Notebooks from here.
Previous: DataFrame - astype() function
Next: DataFrame - copy() function
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/pandas/dataframe/dataframe-infer_objects.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics