<human>:  In pandas Dataframe with multiindex how can I filter by order?
<bot>: Here is some code to select the first row grouped per level 0 of dataframe `df`

df.groupby(level=0, as_index=False).nth(0)

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