pandas remove row if value not in list code example Example: delete rows with value in column pandas df = df[df.line_race != 0]