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: pd.cut() supports str for "bin" argument #59241

Closed
wants to merge 3 commits into from

Conversation

chaarvii
Copy link
Contributor

@chaarvii chaarvii commented Jul 12, 2024

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not fully convinced that this feature needs to be included in pandas as is given its straightforward implementation.

I would support documenting how to use histogram_bin_edges along with cut

@chaarvii
Copy link
Contributor Author

I am not fully convinced that this feature needs to be included in pandas as is given its straightforward implementation.

I would support documenting how to use histogram_bin_edges along with cut

Right, I understand your point. However, since there were efforts in the past to get this feature in pandas #23567 (but weren’t successful due to some dependency versioning issues) and there’s been another request for this feature recently (#59165), I’d say its worth reconsidering. The implementation is simple, less likely to break things hence easier to support. I feel it would improve user experience - still just a suggestion, happy to discard this work and open a new PR with documentation changes if you’re still not convinced.

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

Successfully merging this pull request may close these issues.

ENH: In pd.cut(), allow bins='auto' (leveraging np.histogram_bin_edges)
2 participants