import numpy as np from sklearn.cluster import KMeans from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler customer_names = np.array( [ "trial-01", "trial-02", "trial-03", "steady-01", "steady-02", "steady-03", "premium-01", "premium-02", "premium-03", ] ) features = np.array( [ [1.2, 18.0], [1.8, 22.0], [2.0, 24.0], [5.8, 47.0], [6.4, 52.0], [6.9, 49.0], [10.2, 85.0], [10.8, 91.0], [11.4, 88.0], ], dtype=float, )