how to change data type of column in 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