Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: add "right" argument to "qcut", like "cut" has #58933

Open
1 of 3 tasks
Tracked by #58986
dwayne298 opened this issue Jun 5, 2024 · 2 comments
Open
1 of 3 tasks
Tracked by #58986

ENH: add "right" argument to "qcut", like "cut" has #58933

dwayne298 opened this issue Jun 5, 2024 · 2 comments
Assignees
Labels

Comments

@dwayne298
Copy link

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

In the cut function, you can specify "right" which defines whether bins includes the rightmose edge or not. It would be useful to have the same functionality with qcut

Feature Description

From a naïve perspective, I think you could just add right=right when _bins_to_cuts is called, just as it is done in cut

Alternative Solutions

Current alternative I think would be to calculate the quantiles outside of pandas and then use those as bins for cut

Additional Context

No response

@dwayne298 dwayne298 added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 5, 2024
@mroeschke mroeschke added cut cut, qcut and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 5, 2024
@aaronchucarroll aaronchucarroll removed their assignment Jun 7, 2024
@giormala
Copy link
Contributor

giormala commented Jun 8, 2024

take

@ucheetah
Copy link

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants