Check Data Type of Columns in pandas DataFrame in Python (2 Examples) | Get dtype of All Variables

preview_player
Показать описание
Python code of this video:

import pandas as pd # Import pandas library

data = pd.DataFrame({'x1':range(60, 55, - 1), # Create pandas DataFrame
'x2':['a', 'b', 'c', 'b', 'c'],
'x3':[True, False, False, True, True]})
print(data) # Print pandas DataFrame

# int64

# x1 int64
# x2 object
# x3 bool
# dtype: object

Follow me on Social Media:

Рекомендации по теме