• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Conditional mean in python

Resolved: Conditional mean in python

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

New to python. Looking to find a mean of 1 column if the 2nd column is below a specific number. So let’s say I have a data frame with 4 columns, 2 of which are age and salary. I would like to find out average salary for people below 40 and for people above 40.
Thanks in advance

Answer:

If you have better answer, please add a comment about this, thank you!

conditional-statements jupyter mean pandas python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: itertools: cycle through several lists N times via iteration

24/03/2023

Resolved: Convert function is not working with {fn } in SQL Server

24/03/2023

Resolved: Why reference in pointer array doesn’t have data?

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.