title: python pandas dataframe find row containing specific value and return boolean
body: <p>I want compare two dataframes which is df1 and df2. df1 is a data that updates every hour by it self. df2 is a dataframe that alreay exists. I want to append specific row that is updated.</p>
  
  <p>for example, Here is df1</p>
  
  <p>df1:</p>
  
  <p><img src="https://i.stack.imgur.com/vfJ4o.png" alt="fd1"></p>
  
  <p>which contains 5 rows of information</p>
  
  <p>and df2 which already existed</p>
  
  <p>df2:</p>
  
  <p><img src="https://i.stack.imgur.com/pOYRu.png" alt="df2"></p>
  
  <p>we can tell that eric is added but df2 is not representing that.</p>
  
  <p>I could overwrite df2 with df1 but I shouldn't as there will be remark that will be updated by person later the data is written.</p>
  
  <p>So, I decided to remove each rows of data by finding it from df2 by its id, and remove them with for loop</p>
  
  <p>and after that, there will be only eric's row will remain which will make me possible to just append eric to df2. </p>
  
  <p>So what I tried is this</p>
  
  <pre><code>for index, row in df1.iterrows():
      id = row['id']
      if df2.loc[df1['id'].isin(id)] = True:
          df1[df1.id != id)
  </code></pre>
  
  <p>and it returns syntax error....</p>
  
  <p>am I on the right track? is it will be the best solution to solve this problem?and how should I change the code to achieve my goal?</p>