if filterids is None:
        pass
    else:
        filterdf = filterdf.merge(pd.DataFrame({'ID': filterids}), how='inner', on='ID')