I have a pandas dataframe that has one column and it has a list of values in each row. I need to calculate the mean using the corresponding values from each row. That is I need the mean for eight values in the list. each element in the list is the value of a variable
>>> df_ex
0 [1, 2, 3, 4, 5, 6, 7, 8]
1 [2, 3, 4, 5, 6, 7, 8, 1]
I tried converting it to numpy array and then taking the means but I keep getting an error TypeError: unsupported operand type(s) for /: 'list' and 'int'. I understand that instead of using lists, I should convert it to columns, but that in my context won't be possible. Any idea on how I could accomplish this?