title: Spark (python): How to 'join' two dataframes where only first occurrences would merge
body: <p>I am looking for a solution for pyspark, but would be happy with the idea/how to solve it in pandas as well. Imagine you have two data frames likes this:</p>
  
  <pre><code>+----+---+
  |name| _2|
  +----+---+
  |   A| 10|
  |   A| 22|
  |   A| 30|
  |   B|  2|
  |   B|  3|
  |   D| 14|
  +----+---+
  
  +----+----+
  |name|   t|
  +----+----+
  |   A|true|
  |   B|true|
  |   C|true|
  +----+----+
  </code></pre>
  
  <p>You want to get the result, where only first occurrences get merged, something like this:</p>
  
  <pre><code>+----+---+-----+
  |name| _2|    t|
  +----+---+-----+
  |   A| 10| true|
  |   A| 22|false|
  |   A| 30|false|
  |   B|  2| true|
  |   B|  3|false|
  |   D| 14|false|
  +----+---+-----+
  </code></pre>