title: PySpark filter by dataframe column
body: <p>I recently started with PySpark, so I am complete beginner. What I want to do is filter from one dataframe based on another dataframe.
  To put it simple, I have df1 with columns A,B,C and df2 with column A. I want to output only df1 rows that have A column values within df2 values.</p>
  
  <p>Currently I have it set up as following:</p>
  
  <pre class="lang-py prettyprint-override"><code>df_final = df1.join(df2, df2.A == df1.A)
  </code></pre>
  
  <p>What I found online also is following solution:</p>
  
  <pre class="lang-py prettyprint-override"><code>df_final = df1.join(df2, Seq("A"), "left_anti")
  </code></pre>
  
  <p>It seems that it does the same thing, but I wonder which one is more correct/better performing?</p>
  
  <p>At the same time, I found also that <code>.filter</code> can be used, but I have no idea how to use it dataframe/list.</p>
  
  <p>Main question actually is - what is the best way to perform this task to run the job as fast as possible?</p>
  
  <p>Thank you and best regards</p>