Skip to content
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: concat should keep series names unless ignore_index=True #56365

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

rob-sil
Copy link
Contributor

@rob-sil rob-sil commented Dec 6, 2023

expected = DataFrame(
np.tile(arr, 3).reshape(-1, 1), index=index.tolist() * 3, columns=[0]
)
result = concat([s1, df, s2])
tm.assert_frame_equal(result, expected)

# Separate columns for series not appearing as column names
Copy link
Member

Choose a reason for hiding this comment

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

Could you make a separate test for this?

@mroeschke mroeschke added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Dec 7, 2023
@mroeschke mroeschke added this to the 2.2 milestone Dec 9, 2023
@mroeschke mroeschke merged commit 71a3e3c into pandas-dev:main Dec 9, 2023
44 checks passed
@mroeschke
Copy link
Member

Thanks @rob-sil

rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Treat Series as 1-column dataframe in concat with dataframe
2 participants