I would like to know what is the correct way to normalize a dataframe before applying PCA. I have found two options and I got different results for each one:
min_max_scaler = preprocessing.MinMaxScaler()
x_scaled = min_max_scaler.fit_transform(x)
scaled_data = pd.DataFrame(x_scaled)
or
scaler = StandardScaler()
scaler.fit(df)
scaled_data = scaler.transform(df)