-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
DOC: fix doctests for pandas/core/generic.py for new string dtype #61907
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 doctests for pandas/core/generic.py for new string dtype #61907
Conversation
…doctests (asof and squeeze)
pandas/core/generic.py
Outdated
@@ -885,7 +885,7 @@ def squeeze(self, axis: Axis | None = None) -> Scalar | Series | DataFrame: | |||
dtype: int64 | |||
|
|||
>>> even_primes.squeeze() | |||
np.int64(2) | |||
2 |
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.
With which version of numpy are you running the doctests locally?
I personally don't particularly like the np.int64(2)
repr for in the docstrings, but I see that was recently changed in #60987 to follow the latest numpy
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.
Ah right, thanks for catching that. I’ll revert it
pandas/core/generic.py
Outdated
@@ -11804,7 +11804,7 @@ def first_valid_index(self) -> Hashable: | |||
>>> print(df.last_valid_index()) | |||
None | |||
|
|||
If all elements in DataFrame are NA/null, returns None. | |||
If all elements in DataFrame are NA/null, returns NaN. |
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.
The example below still shows None?
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.
Ah my bad, thanks.
Thanks! |
closes #xxxx (Replace xxxx with the GitHub issue number)Added type annotations to new arguments/methods/functions.Added an entry in the latestdoc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Part of #61886