Generation

generate functionWed, 15 Mar 2023

Write code that brings all the values of the data frame to the same scale using the StandardScaler library from the sklearn.preprocessing library: sepal_length sepal_width 0 5.1 3.5 1 4.9 3.0 2 4.7 3.2

from sklearn.preprocessing import StandardScaler std_scaler = StandardScaler() df_scaled = std_scaler.fit_transform(df) print(df_scaled)

Questions about programming?Chat with your personal AI assistant