I have the dataframe:
col1 col2 col3
1 7 8
1.5 6.7 9
1.24 5.5 8.8
I want to write the function, which will add the column's values as lists to a list. So there will be the nested list, with those values:
[[1,1.5,1.24], [7,6.7,5.5], [8,9,8.8]]
I wrote the below function, but it is not working:
def func1(df):
my_list=[]
for i in df:
my_list.append(i)