Skip to content

Instantly share code, notes, and snippets.

@shayaf84
Created September 14, 2021 16:22
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 shayaf84/799b7277f8f66a2894565fb53209e0fa to your computer and use it in GitHub Desktop.
Save shayaf84/799b7277f8f66a2894565fb53209e0fa to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
for i in X_train_Before:
scaler = StandardScaler()
X_train_Before[i] = scaler.fit_transform(X_train_Before[i].values.reshape(-1,1))
X_test[i] = scaler.transform(X_test[i].values.reshape(-1,1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment