I am new to pandas and I’ve been given a dataframe having millions of rows. I want to compare a particular column with further alternate consecutive columns and compare the values whether it lies between those two alternate columns in the same dataframe.
I’m having difficulty in accessing those alternate columns-
if the values doesn’t lies between the first two alternate columns then next column should be checked.
I tried looping it through but couldn’t get how to get accessing values from alternate columns