-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Bug: fix Concatenating dataframe and series with ignore_index = True #60983
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Matthew Roeschke <[email protected]>
expected = DataFrame( | ||
np.kron(np.where(np.identity(3) == 1, 1, np.nan), arr).T, | ||
index=np.arange(30, dtype=np.int64), | ||
columns=["foo", 0, "bar"], | ||
) |
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.
Previous expected DataFrame is incorrect. It then had only 1 column instead of 3 as all their names were getting replaced by 0 and so were merged into 1 column with name 0.
Now changed the code with this PR, so each column will have its previous name and wont get replaced by name 0.
Hi @rhshadrach Requesting a review as no reviewer is assigned to the PR Thanks |
ignore_index = True
drops the series name #60723 and BUG:pd.concat
on axis "index" has unexpected result concatenating Series and DataFrame with same (column) name #56257doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.