Skip to content

Conversation

abhaypsingh
Copy link

The explanatory paragraph wrongly said that alignment is between other and cond. It is between self and cond; values fall back to self for mis-aligned positions. Update both generic docstring templates so all Series/DataFrame variants inherit the correct wording.

Closes #61781

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

The explanatory paragraph wrongly said that alignment is between
`other` and `cond`.  It is between *self* and `cond`; values fall
back to *self* for mis-aligned positions.  Update both generic
docstring templates so all Series/DataFrame variants inherit the
correct wording.

Closes pandas-dev#61781

Signed-off-by: Abhay Singh <[email protected]>
@abhaypsingh
Copy link
Author

How do I merge this?

Copy link
Contributor

github-actions bot commented Sep 3, 2025

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Sep 3, 2025
element is used; otherwise the corresponding element from
``other`` is used. If the axis of ``other`` does not align with axis of
``cond`` {klass}, the values of ``cond`` on misaligned index positions
will be filled with {cond_rev}.
Copy link
Member

Choose a reason for hiding this comment

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

the other in L9949 i agree should be self. the rest of this i think is OK as it means that cond is reindexed with cond_rev as its fill_value.

Copy link
Member

Choose a reason for hiding this comment

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

(actually passing fill_value to align might be better than the current implementation that separately calls fillna after align.

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Oct 5, 2025
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.

DOC: Typo within Series.mask() docs - alignment is done between self and cond, not cond and other

3 participants