Generation

generate functionWed, 15 Mar 2023

There is the "sl" list and there is the "sw" list. Write code that will create a scaled_data dataframe with the values from "sl" in the first column and "sw" in the second column

def create_scaled_data(sl, sw): scaled_data_1 = (sl - min(sl))/(max(sl) - min(sl)) scaled_data_2 = (sw - min(sw))/(max(sw) - min(sw)) scaled_data = pd.DataFrame({'sl': scaled_data_1, 'sw': scaled_data_2}) return scaled_data scaled_data = create_scaled_data(sl, sw)

Questions about programming?Chat with your personal AI assistant