A Pandas DataFrame is iterated over as (index, Series) pairs.
Solution for How to iterate over rows of a Pandas DataFrame in Python : You can use pd.DataFrame.iterrows() to iterate over a Pandas DataFrame Call pd.DataFrame.iterrows() to return a generator of rows. Use the generator to iterate over the rows of the DataFrame.