-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC/PLT: Add stacked
in doc and doc example for barh and bar plot
#33337
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
DOC/PLT: Add stacked
in doc and doc example for barh and bar plot
#33337
Conversation
Hello @charlesdong1991! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-05 14:36:22 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicks
pandas/plotting/_core.py
Outdated
@@ -954,6 +954,9 @@ def line(self, x=None, y=None, **kwargs): | |||
|
|||
@Appender( | |||
""" | |||
stacked: bool, default is False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stacked: bool, default is False | |
stacked : bool, default False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
pandas/plotting/_core.py
Outdated
@@ -1037,6 +1047,9 @@ def bar(self, x=None, y=None, **kwargs): | |||
|
|||
@Appender( | |||
""" | |||
stacked: bool, default is False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stacked: bool, default is False | |
stacked : bool, default False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
pandas/plotting/_core.py
Outdated
@@ -985,6 +988,13 @@ def line(self, x=None, y=None, **kwargs): | |||
... 'lifespan': lifespan}, index=index) | |||
>>> ax = df.plot.bar(rot=0) | |||
|
|||
Plot stacked bar chars for the DataFrame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ‘bar charts’?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! 😅 Nice catch!
pandas/plotting/_core.py
Outdated
@@ -1066,6 +1079,13 @@ def bar(self, x=None, y=None, **kwargs): | |||
... 'lifespan': lifespan}, index=index) | |||
>>> ax = df.plot.barh() | |||
|
|||
Plot stacked bar chars for the DataFrame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Can you post a screenshot of the built docs? Doesn't this place the argument out of order (i.e. after the Returns section)? |
Hi, @WillAyd thanks for your review! You are right, it is not the right place for parameters. And I removed it because i noticed another PR #33596 has included So the remaining question is the code example, I think it would be nice for users to see the example. But if you think it is not needed because its quite straightforward, then let's close this PR. I am open to hearing from your preference! |
ping @WillAyd pls let me know if it is still worth it to have this one in doc? ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @datapythonista
Thanks @charlesdong1991 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff