title: Join two DataFrames where the join key is different and only select some columns
body: <p>What I would like to do is: </p>
  
  <p>Join two DataFrames <code>A</code> and <code>B</code> using their respective <code>id</code> columns <code>a_id</code> and <code>b_id</code>. I want to select all columns from <code>A</code> and two specific columns from <code>B</code></p>
  
  <p>I tried something like what I put below with different quotation marks but still not working. I feel in pyspark, there should have a simple way to do this. </p>
  
  <pre class="lang-python prettyprint-override"><code>A_B = A.join(B, A.id == B.id).select(A.*, B.b1, B.b2)
  </code></pre>
  
  <p>I know you could write </p>
  
  <pre class="lang-python prettyprint-override"><code>A_B = sqlContext.sql("SELECT A.*, B.b1, B.b2 FROM A JOIN B ON A.a_id = B.b_id")
  </code></pre>
  
  <p>to do this but I would like to do it more like the pseudo code above.</p>