Skip to content

DOC: Updated the returns for DataFrame.any/all to return either a Series or scalar #57817

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

Conversation

sammig6i
Copy link

@sammig6i sammig6i commented Mar 12, 2024

#57088
updated documentation for reflect the return types for Dataframe.any/all calls.

@sammig6i sammig6i changed the title BUG: Updated the returns for DataFrame.any/all to return either a Series or scalar. Would BUG: Updated the returns for DataFrame.any/all to return either a Series or scalar Mar 12, 2024
@sammig6i sammig6i changed the title BUG: Updated the returns for DataFrame.any/all to return either a Series or scalar DOC: Updated the returns for DataFrame.any/all to return either a Series or scalar Mar 12, 2024
@datapythonista
Copy link
Member

/preview

Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57817/

{name1} or {name2}
If level is specified, then, {name2} is returned; otherwise, {name1}
{name1} or scalar
If axis=None, then a scalar boolean is returned. Otherwise, a {name1} is returned with index matching the index argument.
Copy link
Member

Choose a reason for hiding this comment

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

There shouldn't be a period at the end. See how it renders here: https://pandas.pydata.org/preview/pandas-dev/pandas/57817/docs/reference/api/pandas.Series.any.html#pandas.Series.any

Also, the type is scalar or scalar. I think this already happens in the docs, but since you are already changing this, maybe worth leaving it well.

Also note that while the discussion is not settle, people seems to be happy to stop reusing docstrings. So if you want to replicate the docstring for each method, that would be ok.

@datapythonista
Copy link
Member

@sammig6i do you mind having a look at #57682 and see if the changes here conflict with the changes there please? I think you're modifying the same exact part of the documentation, and if that's the case it's probably better to discontinue this one (feel free to provide any feedback to that PR). Thanks!

@datapythonista
Copy link
Member

Closing, as this seems to be duplicated and stale.

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.

2 participants