Skip to content

Update hist.py #59947

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

Closed
wants to merge 1 commit into from
Closed

Update hist.py #59947

wants to merge 1 commit into from

Conversation

rraadd88
Copy link

@rraadd88 rraadd88 commented Oct 2, 2024

Minor improvement, allowing inference of the xlabel for a histgram plotted using a Series.

Reduces these lines of code:

ax=ds.hist()
ax.set(
    xlabel=ds.name,
)

to

ds.hist()

  • [NA] closes #xxxx (Replace xxxx with the GitHub issue number)
  • [NA] Tests added and passed if fixing a bug or adding a new feature
  • [NA] All code checks passed.
  • [NA] Added type annotations to new arguments/methods/functions.
  • [NA] Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

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.

Is there an issue related to this PR? Typically the project requires an issue with discussion and buy-in from the core team before proceeded.

IMO generally pandas has been moving away from automatic inference so I would be -1 for this behavior

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Oct 29, 2024
@rraadd88
Copy link
Author

No worries. If anyone stumbles on this, there is a wrapper package called roux which implements this shortcut.
Demo: https://github.com/rraadd88/roux/blob/323b076ee5649cfcb7b99a1ba5be700a2a9cf0db/examples/roux_viz_ds.ipynb

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.

2 participants