Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

To Change the data types of a column.

df_asset['Dwell_Type']=df_asset['Dwell_Type'].astype('O')#here we used uppercase O to set as object.
df_asset['Zone_Class']=df_asset['Zone_Class'].astype('O')
df_asset['OverallQual']=df_asset['OverallQual'].astype('O')
df_asset['OverallCond']=df_asset['OverallCond'].astype('O')
df_asset['BsmtFullBath']=df_asset['BsmtFullBath'].astype('O')
df_asset['BsmtHalfBath']=df_asset['BsmtHalfBath'].astype('O')
Source by colab.research.google.com #
 
PREVIOUS NEXT
Tagged: #To #Change #data #types
ADD COMMENT
Topic
Name
9+2 =