Skip to content

Instantly share code, notes, and snippets.

@srang992
Created May 26, 2022 03:21
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 srang992/f57192e06f04c6184fb6506b483969c6 to your computer and use it in GitHub Desktop.
Save srang992/f57192e06f04c6184fb6506b483969c6 to your computer and use it in GitHub Desktop.
# making a ColumnTransformer object
ct = ColumnTransformer(
[('scaler', StandardScaler(), ['seconds_of_use', 'frequency_of_sms', 'customer_value'])], remainder='passthrough')
# transforming data
X_scaled = ct.fit_transform(X_resampled)
X_test_scaled = ct.transform(X_test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment