Skip to content

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
@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