def filter_with_values(df, variable, values):
    """
    Filter dataset for rows containing a specific value in a variable column.
    
    Parameters
    ----------
    df : pandas DataFrame
        dataframe to be filtered
    variable : str
        name of variable to be used for filtering
    values : int/float or list
        value, or list of values, to filter for in variable column

    Returns
    -------
    filtered_df : pandas DataFrame
        dataframe that has been filtered for value in variable column
    """
    if isinstance(values, (int, float)):
        values = [values]  # Coerce to list when single value, for isin()
    filtered_df = df.loc[df[variable].isin(values)]
    return filtered_df