pandas drop column if row is value code example Example: dataframe drop rows by column value df = df[df.line_race != 0]