0

I have a dataframe for a fiscal year where one column is called Tot.Salary. This is a list of salaries for each employee in the dataframe and contains a broad range of numbers with decimals. I need to find out how many employees earned salaries within a range of those numbers, in addition to knowing what percentage of employees earned salaries within a range of those numbers

What is a code that will iterate through the column and return the percentage of salaries within a salary range?

For example, the output should look something like:

12,000 of workers earned $0-$50000

9,000 of workers earned $50001-$70000

5,000 of workers earned $70001-$90000

For example, the output should look something like:

40% of workers earned $0-$50000

20% of workers earned $50001-$70000

30% of workers earned $70001-$90000
camille
  • 15,634
  • 17
  • 33
  • 53
S_C
  • 1
  • 1
  • It's really hard to give useful help without a [reproducible example](https://stackoverflow.com/q/5963269/5325862) and some code. If all you need is to calculate summary statistics from a data frame, there are a lot of SO posts already that should help – camille Sep 18 '21 at 02:24

0 Answers0