I believe the following function is a working solution for pandas DataFrame rolling argmin/max:
import numpy as np def data_frame_rolling_idx_func(df, window