mode imputation in python

Solutions on MaxInterview for mode imputation in python by the best coders in the world

showing results for - "mode imputation in python"
Emely
14 Jan 2018
1df['country'].fillna(df['country'].mode()[0], inplace = True)
Pietro
13 Sep 2016
1cols = ["workclass", "native-country"]
2df[cols]=df[cols].fillna(df.mode().iloc[0])
3