-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
BUG: Fix Series.reindex losing values when reindexing to MultiIndex #61969
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does DataFrame.reindex
also need the same handling?
Yes, Dataframe with single index is having the same issue
How its the same scenario for multiindex, reindex only works if all index are matching. Infact specifying level for multiIndex dataframe is raising TypeError
Reindex MultiIndex dataframe works iff all indexes match. I will leave the multiIndex dataframe functionality as is and address the issue in single index dataframe like the example above. lmk what you think. |
@mroeschke could you please review it when you get a chance |
doc/source/whatsnew/v3.0.0.rst
file if fixing a bug or adding a new feature.##Series.reindex()
#Before
#After
##Datafram.reindex()
Before
After