Created
June 1, 2020 01:57
-
-
Save ChristopherDaigle/f14fa42fbceeb894b642c46988c0f86b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.preprocessing import MinMaxScaler | |
scaler = MinMaxScaler(feature_range=(0, 1)) | |
numerical = ['orig_title_len', 'overview_len', 'tagline_len', 'title_len', | |
'popularity', 'runtime', 'vote_average', 'vote_count'] | |
df_impute_log_minmax = pd.DataFrame(data = df_1_impute_fill).copy() | |
df_impute_log_minmax[numerical] = scaler.fit_transform(df_1_impute_fill[numerical]) | |
# Preserve final df transformation: | |
df_impute_transformed = df_impute_log_minmax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment