def get_feature_names(df, include_c):
    """
    Returns a list of feature names from a dataframe, optionally excluding
    categorical variables.
    Parameters
    ----------
    df : pd.DataFrame
    include_c : bool
    Returns
    -------
    names : list of strings
    """
    names = [f for f in df.columns if not f.startswith('y')]
    if not include_c:
        names = [f for f in names if not f.startswith('c')]
    return names