Answers for "ipyting mode for categorical column"

1

impute mode pandas

cols = ["workclass", "native-country"]
df[cols]=df[cols].fillna(df.mode().iloc[0])
Posted by: Guest on December-01-2020

Code answers related to "ipyting mode for categorical column"

Python Answers by Framework

Browse Popular Code Answers by Language