xxxxxxxxxx
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
scaler.fit_transform(X_train)
scaler.transform(X_test)
xxxxxxxxxx
# selective scale columns in pandas df
from sklearn import preprocessing
columns_to_scale = ['col1', 'col2']
scaler = preprocessing.MinMaxScaler()
df[columns_to_scale] = scaler.fit_transform(df[columns_to_scale])