ipyting mode for categorical column code example
Example: impute mode pandas
cols = ["workclass", "native-country"]
df[cols]=df[cols].fillna(df.mode().iloc[0])
cols = ["workclass", "native-country"]
df[cols]=df[cols].fillna(df.mode().iloc[0])