Iterating through iterrows
<p>iterrows can be used to iterate through a pandas dataframe:</p>

<pre><code>for row in df.iterrows():
    print(row)
</code></pre>

<p>How can I use a second for loop to iterate through each element in the row?</p>

<p>iterrows returns a tuple. The element indexed by [1] contains the row. You can then iterate through that element.</p>

<pre><code>for row in x.iterrows():
    print(row[1])
    for b in row[1]:
        print(b)
</code></pre>

python pandas