Skip to content

Instantly share code, notes, and snippets.

@saimadhu-polamuri
Created October 18, 2023 03:08
Show Gist options
  • Save saimadhu-polamuri/41ea2379a58d13f51c20bd0f2254207c to your computer and use it in GitHub Desktop.
Save saimadhu-polamuri/41ea2379a58d13f51c20bd0f2254207c 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_mean = SimpleImputer(strategy='mean')
X_imputed = imp_mean.fit_transform(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment