Answers for "conditional_impute(train_df, choice='mean')[['Name','Age']].tail()"

1

mode imputation in python

df['country'].fillna(df['country'].mode()[0], inplace = True)
Posted by: Guest on September-01-2020
1

impute mode pandas

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

Python Answers by Framework

Browse Popular Code Answers by Language