Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 17, 2020 06:35
Show Gist options
  • Save aniruddha27/af3e0087cdeba6bdbdccc4f944cea468 to your computer and use it in GitHub Desktop.
Save aniruddha27/af3e0087cdeba6bdbdccc4f944cea468 to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
col = train.columns
for i in col:
if train[i].dtype!='object':
train[i] = scaler.fit_transform(train[[i]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment