https://dataindependent.com/pandas/pa...
Folks come to me and often say, "I have a Pandas DataFrame and I want to iterate over rows." My first response is, are you sure? Ok, fine, let's continue.
Depending on your situation, you have a menu of methods to choose from. Each with their own performance and usability tradeoffs. Here are the methods in recommended order:
DataFrame.apply()
DataFrame.iterrows()
DataFrame.itertuples()
Concert to DataFrame to Dictionary
DataFrame.iloc