Skip to content

Instantly share code, notes, and snippets.

@saimadhu-polamuri
Created October 18, 2023 03:10
Show Gist options
  • Save saimadhu-polamuri/9da524815fce4d757f287c627fa88294 to your computer and use it in GitHub Desktop.
Save saimadhu-polamuri/9da524815fce4d757f287c627fa88294 to your computer and use it in GitHub Desktop.
from sklearn.impute import SimpleImputer
from sklearn.datasets import load_diabetes
diabetes = load_diabetes()
X, y = diabetes.data, diabetes.target
imp_mode = SimpleImputer(strategy='most_frequent')
X_imputed = imp_mode.fit_transform(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment