title: How can I enumerate rows in groups with Spark/Python?
body: <p>I'd like to enumerate grouped values just like with Pandas:</p>
  
  <p><a href="https://stackoverflow.com/questions/17228215/enumerate-each-row-for-each-group-in-a-dataframe">Enumerate each row for each group in a DataFrame</a></p>
  
  <p>What is a way in Spark/Python?</p>