0
Q:

dataframe, groupby, select one

df.sort_values('date').groupby(['id', 'period', 'type']).first()
1

New to Communities?

Join the community