how to change data types in python dataframe code example
Example: change dataframe column type
>>> df.astype({'col1': 'int32'}).dtypes
col1 int32
col2 int64
dtype: object
>>> df.astype({'col1': 'int32'}).dtypes
col1 int32
col2 int64
dtype: object