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.