0

I have numeric data in a column from each value is from 1-28.

I need to do a value count and a percentage by splitting it into two categories 1-21, and 22-28.

I need something like:

Category   cout  percentage 
1-21       xxx      xxx%
22-28      xxx      xxx%

How can I do this in pandas?

I've tried may different things from cut and groupby but I can't seem to figure it out.

Thank you for your help and time.

boardkeystown
  • 180
  • 1
  • 11

0 Answers0