The Series.str.contains method will return True for str elements in a series that contain a substring. So df[df.OABP.str.contains('Biking / Cycling')].groupby('Gender').size() should give you the answer.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.