pandas как узнать тип данных
Ответы

Ivan Mamtsev
10 сентября 2024
Чтобы узнать тип данных в pandas есть встроенный метод dtypes
df = pd.DataFrame({'float': [1.0],
'int': [1],
'datetime': [pd.Timestamp('20180310')],
'string': ['foo']})
df.dtypes
# float float64
# int int64
# datetime datetime64[ns]
# string object
# dtype: object
0
0