I have a question regarding the bins in pandas. My code so far looks like this:
africa_uhc = pd.cut(africa[("Universal health coverage (UHC) service coverage index")]/100, [0, 0.25, 0.50, 0.75, 1])
which prints out
29 (0.5, 0.75]
36 (0.25, 0.5]
111 (0.5, 0.75]
112 (0.5, 0.75]
118 (0.25, 0.5]
140 (0.25, 0.5]
141 (0.5, 0.75]
142 (0, 0.25]
Name: Universal health coverage (UHC) service coverage index, dtype: category
Categories (4, object): [(0, 0.25] < (0.25, 0.5] < (0.5, 0.75] < (0.75, 1]]
I want to take the numbers in the second row out to do some more aggregrations, is there a way to do this? Or is there a way to split them into bins by rounding them up? eg, index 29 would have 0.75 rather than(0.5, 0.75]. Thanks!