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