How to Iterate over rows in a dataframe
&quot;What approach should I use to match rows in my data frame to each other based on columns and then manipulate them.&quot;
Use pandas.DataFrame.loc:

Setting values
Set value for all items matching the list of labels

df.loc[['viper', 'sidewinder'], ['shield']] = 50
df
            max_speed  shield
cobra               1       2
viper               4      50
sidewinder          7      50


Set value for rows matching callable condition

df.loc[df['shield'] &gt; 35] = 0
df
            max_speed  shield
cobra              30      10
viper               0       0
sidewinder          0       0