Skip to content

Instantly share code, notes, and snippets.

@terrah27
Created March 12, 2022 02:10
Show Gist options
  • Save terrah27/579a1d73ee71e27cd76bd289d011f0ab to your computer and use it in GitHub Desktop.
Save terrah27/579a1d73ee71e27cd76bd289d011f0ab to your computer and use it in GitHub Desktop.
# Impute with scikit-learn SimpleImputer
from sklearn.impute import SimpleImputer
imputer = SimpleImputer(strategy='most_frequent')
imputer.fit(imputed_df)
imputed_df = imputer.transform(imputed_df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment