Answers for "convert object data type to int pandas"

0

object to int64 pandas

>>> df['purchase'].astype(str).astype(int)
Posted by: Guest on March-03-2021
8

change dataframe column type

>>> df.astype({'col1': 'int32'}).dtypes
col1    int32
col2    int64
dtype: object
Posted by: Guest on July-09-2020

Code answers related to "convert object data type to int pandas"

Python Answers by Framework

Browse Popular Code Answers by Language