title: Pandas Dataframe override existing row
body: <p>I have a pandas dataframe exported to CSV, storing an index, username, and a string specific to the user. I want a function to edit the string of the user if they already exist in the database, and create a user if they don't. For example:</p>
  <pre><code>,User,String
  0,Bob,Bob Is Cool
  1,Joe,Joe Is Great
  </code></pre>
  <p>Adding <code>Joe</code> and <code>Joe is Smart</code> will make it:</p>
  <pre><code>,User,String
  0,Bob,Bob Is Cool
  1,Joe,Joe Is Smart
  </code></pre>
  <p>Adding <code>Jeff</code> and <code>Jeff is Good</code> will make it:</p>
  <pre><code>,User,String
  0,Bob,Bob Is Cool
  1,Joe,Joe Is Smart
  2,Jeff,Jeff is Good
  </code></pre>
  <p>I tried using <code>in</code>. For Example:</p>
  <pre><code>if user in df.User:
  </code></pre>
  <pre><code>if user in df.values:
  </code></pre>
  <p>And so on but I can't seem to get it to work. It always adds a new entry no matter what.</p>
  <p>Any help is appreciated. Thanks in Advance!</p>