title: How to add a column in pyspark if two column values is in another dataframe?
body: <p>I'm very new to pyspark. I have two dataframes like this:</p>
  
  <p>df1:
  <a href="https://i.stack.imgur.com/RgNts.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>df2:
  <a href="https://i.stack.imgur.com/znAEU.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p><code>label</code> column in df1 does not exist at first. I added it later. If <code>[user_id, sku_id]</code> pair of df1 is in df2, then I want to add a column in df1 and set it to 1, otherwise 0, just like df1 shows. How can I do it in pyspark? I'm using py2.7.</p>