title: Pandas rolling min max
body: <p>How  findout  the  one  which comes first among  max and min in a rolling window of size n on dataframe and store the quantified values(lets say 1 if max comes first and 0 if min comes first) ?</p>