Skip to content

Update groupby().first() documentation to clarify behavior with missing data (#27578) #61345

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ericcht
Copy link

@ericcht ericcht commented Apr 23, 2025

This PR enhances the docstring for GroupBy.first() to clarify:

  • It returns the first non-null value per column
  • It differs from .nth(0) and .head(1) in how it treats missing values
  • Includes comparative examples for better understanding

Fixes part of issue #27578

Ready for review.

@ericcht ericcht requested a review from rhshadrach as a code owner April 23, 2025 18:39
@ericcht ericcht force-pushed the doc-groupby-first-update branch from 4234958 to b4d068f Compare April 23, 2025 18:50
@ericcht ericcht marked this pull request as draft April 23, 2025 19:04
@ericcht ericcht closed this Apr 23, 2025
@ericcht ericcht deleted the doc-groupby-first-update branch April 23, 2025 19:07
@ericcht ericcht changed the title DOC: clarify column-wise behavior of GroupBy.first and its handling of nulls (#42406) Update groupby().first() documentation to clarify behavior with missing data (#27578) Apr 23, 2025
@ericcht ericcht restored the doc-groupby-first-update branch April 23, 2025 19:09
@ericcht ericcht reopened this Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant