Machine Learning, Exploratory Data Analysis.
integers le = LabelEncoder() y_encoded = le.fit_transform(sdss_df_fe['class']) sdss_df_fe['class'] = y_encoded # Principal Component Analysis pca = PCA(n_components=3) ugriz = pca.fit_transform(sdss_df_fe[['u', 'g', 'r', 'i', 'z']]) # update dataframe sdss_df_fe = pd.concat((sdss_df_fe,