Quantcast
Channel: Bining a set of numbers in a specific way - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Panda Kim for Bining a set of numbers in a specific way

Exampleimport pandas as pds = pd.Series(range(1000, 2004)).div(10)s:0 100.01 100.12 100.23 100.34 100.4 ... 999 199.91000 200.0 <-- exactly 2001001 200.11002 200.21003 200.3Length: 1004, dtype:...

View Article



Answer by Sash Sinha for Bining a set of numbers in a specific way

You can use pandas.cut and pandas.DataFrame.groupby, you just need to make the last bin right boundary more than the actual inclusive boundry you want, e.g., 201 or 200.1 since you are specifying...

View Article

Bining a set of numbers in a specific way

I want to split a set of numbers from 100 (inclusive) to 200 (inclusive) in bins. The numbers are needed to be split in those intervals: [100, 135), [135, 160), [160, 175), [175, 190), [190, 200]....

View Article
Browsing all 3 articles
Browse latest View live




Latest Images