I have a dataset like:
df = pd.DataFrame({'scientist':["Wendelaar Bonga"," Sjoerd E.", "Grätzel"," Michael", "Willett", "Walter C.",
"Kessler", "Ronald C.", "Witten, Edward", "Wang, Zhong Lin"],
'SubjectField': ["Biomedical Engineering", "Inorganic & Nuclear Chemistry",
"Organic Chemistry", "Biomedical Engineering", "Developmental Biology",
"Mechanical Engineering & Transports", "Biomedical Engineering", "Microbiology",
"Cardiovascular System & Hematology", "Biomedical Engineering"]})
I want to count the number of scientists in each subject field and extract subject fields that have more than 2 scientists. this is my code to count the number of scientists
number_of_scientists_in_fields=data.groupby(['SubjectField'])['scientist'].count()
how can I extract subject fields that have more than 2 scientists?