Standardizing a set of columns in a pandas dataframe with sklearn
Standardizing a set of columns in a pandas dataframe with sklearn Question: I have a table with four columns: CustomerID, Recency, Frequency and Revenue. I need to standardize (scale) the columns Recency, Frequency and Revenue and save the column CustomerID. I used this code: from sklearn.preprocessing import normalize, StandardScaler df.set_index(‘CustomerID’, inplace = True) standard_scaler = …