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. The values in the lists are contained in the following format: [[-0.90068117] [-1.14301691] [-1.38535265] [-1.50652052] [-1.02184904] [-0.53717756] [-1.50652052] [-1.02184904] [-1.74885626] [-1.14301691]]

def create_dataframe(sl, sw): scaled_data = pd.DataFrame({ "sl": sl, "sw": sw }) return scaled_data create_dataframe(sl, sw)

Questions about programming?Chat with your personal AI assistant