# standard scalar takes a 2d array of (n_samples, n_features)
# and normalizes the features, so that you end up with mean(X) = 0
# and variance(X) = 1
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
normalized = sc.fit_transform(ndarray) # fit the scaler and transform the data in one step