title: Differences between append and where in pandas
body: <p>I have a df named <code>bas</code>. For example it looks like this:</p>
  
  <pre><code>    nat rac numberOnly  
  0   DD  AR  548484554
  1   AD  AR  168484245
  2   FF  COL 484984554
  3   WW  DE  484845225
  ...
  </code></pre>
  
  <p>It has 50k+ rows. I tried to got only records with <code>rac == AR or COL</code>. </p>
  
  <p>I wrote that code: </p>
  
  <pre><code>AR = bas.where(bas.rac == "AR").dropna()
  COL = bas.where(bas.rac == "COL").dropna()
  
  DF = pd.DataFrame()
  DF = DF.append(AR)
  DF = DF.append(COL)
  </code></pre>
  
  <p>And Len of df is 27429. But the code dosen't look good. Especially that I want to filter more <code>rac</code> later. So I decided to recode it in this way:</p>
  
  <pre><code>DF = bas.where(bas.rac == ("AR" or "COL")).dropna()
  </code></pre>
  
  <p>And in this case DF has 27196 rows.</p>
  
  <p>Why? What's the difference here? Which method is better? Maybe I should use something else, instead?</p>