hea_subjects = gavo_regtap.search("select top 10 res_subject, count(*) as cnt from rr.res_subject where ivoid ilike '%nasa.heasarc%' group by res_subject order by cnt desc").to_table()
culprits = []
correct = []
for i,s in enumerate(hea_subjects['res_subject'].data):
if s.lower() in uat_name_list:
correct.append((s,hea_subjects['cnt'][i]))
else:
culprits.append((s,subjects['cnt'][i]))
print(f"For HEASARC: Found {len(culprits)} Registry res_subject entries that are not in the UAT and {len(correct)} that are.")
print(f" The top 10 bad subject values by number of instances are")
[print(f"{c[0]}: {c[1]}") for c in culprits[0:10] ]
gives