from sklearn.preprocessing import MinMaxScaler scaler = MinMaxScaler() scaler.fit_transform(X_train) scaler.transform(X_test)