python - How can I convert the StandardScaler
Sep 30, 2020 · 1. This answer is not useful. Show activity on this post. As you mentioned, applying the scaling results in a numpy array, to get a dataframe you can initialize a new one: import pandas as pd cols = X_train.columns sc = StandardScaler () X_train_sc = pd.DataFrame (sc.fit_transform (X_train), columns=cols) X_test_sc = pd.DataFrame (sc.transform ...
DA: 77 PA: 97 MOZ Rank: 43