I have the following pandas dataframe called table and want to store all its cell values in a single list:
table = pd.DataFrame({'col-1':[2,7,13,16,23,26,27,29], 'col-2':[541,3,0,15,329,525,6,28], 'col-3':[0,571,0,9,9,0,62,0]}, index=['row-1','row-2','row-3','row-4','row-5','row-6','row-7','row-8'])
The final output should be like this:
my_list = [2,7,13,16,23,26,27,29,541,3,0,15,329,525,6,28,0,571,0,9,9,0,62,0]
Will appreciate it if you can teach me the most efficient way to undertake this task. Cheers.