def filter(df):
    """
    Retain only restaurant businesses that are open
    :param df: business dataframe
    :return: restaurant business dataframe
    """
    df = df[df['is_open'] == True]
    df = df[df.categories.notna()]
    df = df[df['categories'].str.contains("Restaurant|Restaurants|Food") == True]
    return df