python dataframe panda change column type 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