How do I get the first element in a rolling window on Pandas data frame
I have the following data structure: and what I’d like to do is for each location, date to determine what was the spending exactly n days ago. I am trying with a rolling window here but for some reason, when I create the window, I don’t know how to get the first element in it:… Read More How do I get the first element in a rolling window on Pandas data frame