How to modify cells in a pandas DataFrame?
<p>I need to change individual elements in a DataFrame. I tried doing something like this, but it doesn't work:</p>

<pre><code>for index, row in df.iterrows():
    if df.at[row, index] == 'something':
        df.at[row, index] = df.at[row, index] + 'add a string'
    else:
        df.at[row, index] = df.at[row, index] + 'add a value'
</code></pre>

<p>How can I do that?</p>