Skip to content

DOC: clarify .loc Series-assignment alignment behavior#64319

Open
LarytheLord wants to merge 1 commit intopandas-dev:mainfrom
LarytheLord:docs/loc-series-alignment-39845
Open

DOC: clarify .loc Series-assignment alignment behavior#64319
LarytheLord wants to merge 1 commit intopandas-dev:mainfrom
LarytheLord:docs/loc-series-alignment-39845

Conversation

@LarytheLord
Copy link

Summary

  • clarify in .loc docs that Series assignment aligns by label and that the same alignment behavior applies to df[col] = series
  • add an explicit .loc subset-row assignment example showing label alignment and resulting NaN for missing labels
  • mirror the same additions in both IndexingMixin.loc and _LocIndexer docstrings to keep generated docs consistent

Closes #39845.

Validation

  • python3 -m compileall pandas/core/indexing.py
@LarytheLord LarytheLord force-pushed the docs/loc-series-alignment-39845 branch from ea45807 to 3179832 Compare February 28, 2026 19:05
@LarytheLord
Copy link
Author

LarytheLord commented Feb 28, 2026

Rebased on current main and force-pushed (3179832) to refresh CI status (previous run had a cancelled macOS lane). No semantic changes to the docs update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant