Skip to content

Instantly share code, notes, and snippets.

@wibowotangara
Last active January 23, 2024 06:16
Show Gist options
  • Save wibowotangara/b51a37a3b44082c81ebbabdd9aeacde7 to your computer and use it in GitHub Desktop.
Save wibowotangara/b51a37a3b44082c81ebbabdd9aeacde7 to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import StandardScaler
numerical_cols = [col for col in df.columns.tolist() if col not in categorical_cols + ['loan_label']]
ss = StandardScaler()
std = pd.DataFrame(ss.fit_transform(df[numerical_cols]), columns=numerical_cols)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment