0
I need to calculate the sum of several elements in different lists (from index 0).
lista1 = [154,12,998,147]
lista2 = [897,123,998,59877]
lista3 = [3,789,111,555,699]
That would be the simplistic way:
soma = lista1[0]+lista2[0]+lista3[0]
but I need to extract the values and apply the methods rolling().sum()
lista4 = pd.Series([154,897,3])
lista4.rolling(2).sum()
something like that !!
Need only at index 0 or all?
– Woss
only the 'zero'
– Murilo Mendes
And what exactly is the problem of accessing them directly, as you did in the example?
– Woss
The original list is multidimensional, when I try to access the values I need by index (example[0][0]) and add to an external list, the error message: Object 'Nonetype' Not subscribed.
– Murilo Mendes
It’s not very clear what the problem is - it would be nice if you added code demonstrating exactly what problem you’re having with the error message. The way you did it seems okay
– nosklo