I have a csv file that has a few columns which are numbers and few that are string. When I try myDF.dtypes
it shows me all the string columns as object
.
Someone asked a related question before here about why this is done. Is it possible to recast the
dtype
from object to string?Also, in general, is there any easy way to recast the
dtype
fromint64
andfloat64
toint32
andfloat32
and save on the size of the data (in memory / on disk)?