Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 29, 2021 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/7fe542b564e85abc30d31bba52ab9136 to your computer and use it in GitHub Desktop.
Save amankharwal/7fe542b564e85abc30d31bba52ab9136 to your computer and use it in GitHub Desktop.
# Filling values with most frequent values
from sklearn.impute import SimpleImputer
most_frequent = SimpleImputer(strategy='most_frequent')
data3 = most_frequent.fit_transform(data)
print(data3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment