Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.

Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame({"X": ["p", 2, 3, 4]})
df = df.iloc[1:]
df
Out[2]:
X
1 2
2 3
3 4
In [3]:
df.dtypes
Out[3]:
X    object
dtype: object
In [4]:
df.infer_objects().dtypes
Out[4]:
X    int64
dtype: object