def compareonvar(map_df, colvar='all'):
    """
    subsetting a dataframe based on some columns of interest
    
    map_df: (dataframe) the dataframe of the mappingfile table
    colvar: (str or list) the column(s) to use for subsetting; 'None' returns an outerjoin, 'all' returns an innerjoin
    """
    if isinstance(colvar, type(None)):
        return map_df
    if colvar is 'all':
        return map_df.dropna()
    else:
        return map_df.dropna(subset=colvar)
