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 def standardize(df): return df.apply(StandardScaler().fit_transform) standardize(df)

Questions about programming?Chat with your personal AI assistant