Now here is what you need:
def remove_rows(df):
df = df.reset_index(drop=True)
if df[df['events'] == 1].index.empty:
return df
return df.loc[:df[df['events'] == 1].index[0]]
result = df.groupby('id').apply(lambda x: remove_rows(x)).reset_index(drop=True)
print(result)
Which will give you: