0

I have a data frame which has the average amount of delay for each person. a sample of my data comes in the following:

    personId    avg_Time(minutes)   
0   1           -18
1   2           3
2   3           5

I would like to show my data with a bar-chart and categorized the data such as the following: enter image description here

so it shows how many persons have a delay between 0 to 10 minutes, and how many people have a delay between 10 to 20 and so on...

I want to know how I can draw such a figure based on my data. Thank you for your help

sahel
  • 201
  • 2
  • 8

1 Answers1

0

You want to create a histogram of avg_Time with specified bins:

df['avg_Time(minutes)'].hist(bins=[0, 10, 20, 30, 40, 50, 60])
rosebud
  • 71
  • 6