title: Join two dataframes in pyspark by one column
body: <p>I have a two dataframes that I need to join by one column and take just rows from the first dataframe if that id is contained in the same column of second dataframe:</p>
  
  <p>df1:</p>
  
  <pre><code>  id    a     b
    2     1     1
    3    0.5    1
    4     1     2
    5     2     1
  </code></pre>
  
  <p>df2:</p>
  
  <pre><code> id      c    d
    2      fs   a
    5      fa   f
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>df:
    id   a   b
     2   1   1
     5   2   1
  </code></pre>
  
  <p>I have tried with df1.join(df2("id"),"left"), but gives me error :'Dataframe' object is not callable.</p>