Answers for "type pandas"

8

change dataframe column type

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

how to find the datatype of a dataframe in python

df.dtypes
Posted by: Guest on May-20-2020
0

know datatype of pandas

data type
df['DataFrame Column'].dtypes
Posted by: Guest on May-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language