I have a list L. It has random numbers.
I want to get the index of maximum number among each 4 numbers of L.
What is the way to do it ?
I can get the max value from below (i guess ) but not sure how to get index value ? Also is there a way to do same in nd array ???
import pandas as pd
a=np.random.rand(100)
L=list(a)
pd.rolling_max(L, 4)