Skip to content

cut: documentation wrongly claims that labels=False (always) returns an ndarray of ints #51992

Closed
@juliangilbey

Description

@juliangilbey

The documentation for pandas.cut says that the output return type depends on the value of the labels parameter, and when this is False:

* False : returns an ndarray of integers.

But if the input to cut is a Series, then the output is as well, either with dtype=int64 if there are no NaNs in the result, or float64 if there are; an example of this behaviour appears in the documentation for the function.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions