Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created April 23, 2020 19:40
Show Gist options
  • Save curiousily/6c7ef1687ed31b08f7b55eee3d1ef747 to your computer and use it in GitHub Desktop.
Save curiousily/6c7ef1687ed31b08f7b55eee3d1ef747 to your computer and use it in GitHub Desktop.
scale_columns = ['x_axis', 'y_axis', 'z_axis']
scaler = RobustScaler()
scaler = scaler.fit(df_train[scale_columns])
df_train.loc[:, scale_columns] = scaler.transform(
df_train[scale_columns].to_numpy()
)
df_test.loc[:, scale_columns] = scaler.transform(
df_test[scale_columns].to_numpy()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment