def get_varnames(dframe, datasource):
    """
    Getting YCOM and census variable names for hover over feature.
    inputs:
        datasource: string, either 'census' or 'ycom'
        dframe: stacked dataframe, i.e. all_stack
    output:
        nameseries: series of variable names
    """
    nameseries = list(dframe.loc[:][datasource].drop_duplicates())
    return nameseries