Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created June 14, 2019 12:03
Show Gist options
  • Save MariaLavrovskaya/ca9f04c2930d0cf8ee21f6c3b6b8e6cc to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/ca9f04c2930d0cf8ee21f6c3b6b8e6cc to your computer and use it in GitHub Desktop.
#Treating continous variables with Standart Scaler
columns_to_scale = np.array(df_1['runtime'])
#Initiate Scaler:
scaler = StandardScaler()
scaled_columns = scaler.fit_transform(columns_to_scale[:, np.newaxis])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment