Developer.
pd.qcut(df[column].sort_values().rank(method='first'), q=5, duplicates='raise', labels=False) # Convert to a numpy array X = df[feature_cols] X = np.array(X) # Scale the values scaler = StandardScaler() scaler.fit(X) X_scaled = scaler.transform(X) X_scaled Dimensionality Reduction with PCA