Skip to content

DOC: Make pyplot import explicit in the 10 minutes to pandas page #30499

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

Merged
merged 2 commits into from
Jan 1, 2020

Conversation

yuseitahara
Copy link
Contributor

Beginners don't know what is plt, thus it is better to show how to import it explicitly.

This is a continuation of #30274

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Beginners don't know what is `plt`, thus it is better to show how to import it explicitly.
@yuseitahara
Copy link
Contributor Author

@datapythonista Could you please merge this PR? Thank you.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks!

@@ -717,6 +711,8 @@ of the columns with labels:

.. ipython:: python

import matplotlib.pyplot as plt
Copy link
Contributor

Choose a reason for hiding this comment

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

I would leave this where it was, and maybe even add a comment (removing the suppress is ok)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jreback Thank you for your comment. I moved the import statement to the previous position and added a comment.

Also add a comment about the standard convention for referencing the matplotlib API.
@yuseitahara
Copy link
Contributor Author

AttributeError: module 'IPython.utils.py3compat' has no attribute 'cast_bytes_py2'

pandas-dev.pandas (Web_and_Docs) is failing, but is it related to my change?

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=24127&view=logs&j=5291ec4e-9543-503b-43ce-895cf0e06ba3&t=ba0a2b35-e1f8-54df-fd66-2b9fde6f4b1f&l=5158

@rushabh-v
Copy link
Contributor

rushabh-v commented Dec 29, 2019

pandas-dev.pandas (Web_and_Docs) is failing, but is it related to my change?

I also have the same problem. See #30282

@datapythonista
Copy link
Member

@yuseitahara can you merge master into your branch please? It should fix the CI.

@datapythonista
Copy link
Member

@jreback you're changes have been addressed, all green here.

@jreback jreback added this to the 1.0 milestone Jan 1, 2020
@jreback jreback merged commit ff26171 into pandas-dev:master Jan 1, 2020
@jreback
Copy link
Contributor

jreback commented Jan 1, 2020

thanks @yuseitahara

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

Successfully merging this pull request may close these issues.

5 participants