delete specific rows based on condition in python code example
Example 1: delete rows based on condition python
df = df.drop(df[df.score < 50].index)
Example 2: delete rows based on condition python
df.drop(df[df.score < 50].index, inplace=True)