We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
df = pandas.DataFrame({'a': [1, 0, 0, 0]}) df.groupby(pandas.cut(df.a, [0, 1, 2, 3, 4])).apply(lambda x: len(x)) Out[3]: a (0, 1] 1 (1, 2] 0 (2, 3] 0 (3, 4] 3 dtype: int64
final group length should be 0 not 3