Skip to content

BUG: raise in Series.combine_first with duplicate index#66028

Open
C1-BA-B1-F3 wants to merge 1 commit into
pandas-dev:mainfrom
C1-BA-B1-F3:fix-series-combine-first-duplicate-index
Open

BUG: raise in Series.combine_first with duplicate index#66028
C1-BA-B1-F3 wants to merge 1 commit into
pandas-dev:mainfrom
C1-BA-B1-F3:fix-series-combine-first-duplicate-index

Conversation

@C1-BA-B1-F3

Copy link
Copy Markdown

Closes #66009.

  • Require the Series.combine_first identical-index fast path to have a unique index, so duplicate-label cases use the normal reindexing path and raise consistently.
  • Add a regression test for duplicate indices with matching dtypes and identical labels.

Tests:

  • python -m pytest pandas/tests/series/methods/test_combine_first.py -x -q

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.

BUG: Series.combine_first incorrectly handles duplicate indices instead of raising ValueError

1 participant