drop row if column contains a value in pandas python code example Example: pandas dataframe remove rows by column value df = df[df.line_race != 0]