Class Stem Class male/female ratio
Calc 1 1.1
English 0 0.3
History 0 .6
Physics 1 2.3
Above is an example dataframe. I want to make a new dataframe with columns that are only stem classes and the male/female ratio of those stem classes. How do I do this?