Standardscaler() not standardscaling? I have following pipeline:

estimators = []
estimators.append(('standardize', StandardScaler()))
prepare_data = Pipeline(estimators)


Originally, the data looks like



After applying the estimator/StandardScaler()

X_train = prepare_data.fit_transform(X_train_raw)




Why are the values mostly/always negative now?

When I have a look at another variable in X_train it looks as it should (I guess):

Before



after
You got outliers. Standard scaler scales each attribute independently to center at zero and unit variance. Either deal with your outliers or use some more robust scaler. Try instead to plot each attribute with separate box plot.