-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: fix EX02 errors in docstrings #51614
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: fix EX02 errors in docstrings #51614
Conversation
doctests and doctrings had a conflict on |
you're right - I'll take a look at why that might be |
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.
for the plot one, I think we should just remove the output and skip them, like is done here
pandas/pandas/plotting/_core.py
Lines 333 to 339 in 3f2b18a
.. plot:: | |
:context: close-figs | |
>>> np.random.seed(1234) | |
>>> df = pd.DataFrame(np.random.randn(10, 4), | |
... columns=['Col1', 'Col2', 'Col3', 'Col4']) | |
>>> boxplot = df.boxplot(column=['Col1', 'Col2', 'Col3']) # doctest: +SKIP |
It's not really a meaningful doctest anyway, <AxesSubplot: >
could include anything 😄
Thank you. Will do. Just out of curiosity, do you happen to know that why doctests got <AxesSubplot: xlabel='y(t)', ylabel='y(t + 1)'>? I ran the plot on python console and got <AxesSubplot: > too. |
I think it's because one of the doctests (hist_plot if I remember right) from _core.py doesn't have the doctest+skip, and so was setting some option |
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 @lia2710 !
Some work towards issue #51236
Makes docstrings pass EX02 error for: