add tag
Anonymous 1975
how do I find the proportion of the total respondents who were aged less than 45 in pandas?

I have tried this code till now

survey['age_45']=(survey['age'] < 45)
survey['result']=(survey['age_45']  / survey ['age'].count())*100

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.