I have a 2d python list that I want to plot the moving average of. So for each list within the list I want to calculate the moving average seperately. I am not sure how to apply rolling on a list like a Pandas df.
I first converted my 2d list to numeric
value_list = [pd.to_numeric(lst, errors='ignore') for lst in value_list]
My input is this
value_list = [[1,2,3,4,6,2,1,5,2,13,14],[4,5,6,12,32,42,75],[7,8,9,83,12,16]]
My desired output
value_list = [[1.5,2.5,3.5,5,4,1.5,3,3.5,7.5,13.5],[4.5,5.5,9,22,37,58.5],[7.5,8.5,46,47.5,14]]