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