79482408

Date: 2025-03-04 00:15:17
Score: 1
Natty:
Report link

This should be faster than looping:

# Using boolean indexing to find the cutoff index
cutoff_index = df[df['stage'] != 0].index.min()

# Slice and reset index
df = df.iloc[cutoff_index:].reset_index(drop=True)
print(df)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Forneims