Generation

generate functionWed, 15 Mar 2023

There is the "sl" list and there is the "sw" list. Write code that will create a "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]]

import pandas as pd sl = [0.05, 0.4, 0.5, 0.95] sw = [0.7, 0.8, 0.3, 0.9] data = {"sl": sl, "sw": sw}

Questions about programming?Chat with your personal AI assistant