I have a pandas Series and I would like to covert all the rows of my series into a single list. I have:
list1=Series([89.34,88.52,104.19,186.84,198.15,208.88]). Then I have a function which i call:
func(list1)
def func(list1):
list1=list1.values.tolist()
print(list1)
the printed result is :
[[89.34], [88.52], [104.19], [186.84], [198.15], [208.88]]
but I would like to have :
[89.34,88.52,104.19,186.84,198.15,208.88]
any help. I am using python 2.7
listas a variable name because it a globally accessible data structure..values.tolist(), you'd get a list of lists, but if you have a Series, you should simply get a list.