Is there any way I can preform a reversed rolling window without needing to reverse the column?
I am preforming a window normalization and for my implementation it is critical that the window will roll starting at the end while going up every step leaving the new value at the bottom cell. I attached the current sate of my implementation:
dataframe['std'] = dataframe['temperature'].rolling(window=24).std()
dataframe['mean'] = dataframe['temperature'].rolling(window=24).mean()
dataframe['normed'] = (dataframe['temperature'] - dataframe['mean']) / dataframe['std']
my problem with it is that the normalized value is calculated using future measurements. the only solution I came up with is reverse the column and doing the same operations i did before then reversing it again. the problem with it is that it might take a long time and i want to create an efficient algorithm.