pandas, SELECT ROWS BASED ON COLUMN VALUES, when a VALUE CHANGES code example Example: only keep rows of a dataframe based on a column value df.loc[df['column_name'] == some_value]