Human: Pandas dataframe get first row of each group Assistant: 
Here is some code to pandas dataframe get first row of each group by 'id'

df.groupby('id').first()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.