Skip to content

DOC: #55187

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
1 task done
alexandermorgan opened this issue Sep 18, 2023 · 2 comments · Fixed by #55236
Closed
1 task done

DOC: #55187

alexandermorgan opened this issue Sep 18, 2023 · 2 comments · Fixed by #55236
Assignees
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@alexandermorgan
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

pandas.Series.first_valid_index

If all elements are non-NA/null, returns None.

Documentation problem

If all elements are non-NA/null, returns None.

The "Notes" passage reads: "If all elements are non-NA/null, returns None. Also returns None for empty Series/DataFrame."
but the "non-" should not be there.

Suggested fix for documentation

The "non-" should be deleted from the "Notes" section, resulting in this:
"If all elements are NA/null, returns None. Also returns None for empty Series/DataFrame."

@alexandermorgan alexandermorgan added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 18, 2023
@jfadia
Copy link
Contributor

jfadia commented Sep 22, 2023

take

@jfadia
Copy link
Contributor

jfadia commented Sep 22, 2023

My understanding:

  • The function is trying to return the first valid (i.e. non-NA and non-null) index in the series/frame
  • The docs say that if all elements are non-NA/null, returns None, which would imply that we would return None if all elements are non-null, which I believe was not the intent

I will update this to remove the "non-" from that line. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants