I have a dataframe in Python of dimensions 21392x1972. What I would like to accomplish is to convert the data frame into a list of lists, such that the first column of my data frame is the first list within the long list, second column of data frame the second list with the one long list and so on.
I tried to use tolist() to convert the data frame to a list of lists. What is happening now is that each row of my data frame is becoming one list within the long list. But, what I would like to accomplish is that each column of data frame should become one list within the long list. I am new to using Pandas and Python, so any help in this regard is highly appreciated. Cheers!
import pandas as pd
mydataset = pd.read_csv('final_merged_data.csv')
mydataset_seq = mydataset.values.tolist()