Answers for "To Change the data types of a column."

0

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')
Posted by: Guest on March-16-2022

Code answers related to "To Change the data types of a column."

Browse Popular Code Answers by Language