Filter rows that match the desired value to the top.

filter_rows_to_top(df, column, values)

Arguments

df

A data frame

column

Column containing the values of choice

values

Values to be filtered to the top