1

I've used the rolling method to generate rolling sums and averages for each row in my df and this has worked.

My question is, is there an argument that allows me to set the rolling window value calculated at the row previous to the row the pointer is currently evaluating - so at time t-1 rather than at time t?

cs95
  • 379,657
  • 97
  • 704
  • 746
Odisseo
  • 747
  • 1
  • 13
  • 32

1 Answers1

0

You can check with win_type='triang' you can check this for more info

s.rolling(window = 2, win_type = 'triang', min_periods  = 1).sum().shift()
BENY
  • 317,841
  • 20
  • 164
  • 234