title: Spark filter DataFrames based on common values
body: <p>I have DF1 and DF2. First one has a column "new_id", the second has a column "db_id" </p>
  
  <p>I need to FILTER OUT all the rows from the first DataFrame, where the value of new_id is not in db_id. </p>
  
  <pre><code>val new_id = Seq(1, 2, 3, 4)
  val db_id = Seq(1, 4, 5, 6, 10)
  </code></pre>
  
  <p>Then I need the rows with new_id == 1 and 4 to stay in df1 and delete the rows with news_id = 2 and 3 since 2 and 3 are not in db_id</p>
  
  <p>There is a ton of questions on DataFrames here. I might have missed this one. Sorry if that is a duplicate.</p>
  
  <p>p.s I am using Scala if that matters.</p>