Skip to content

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Jul 28, 2023

@mroeschke mroeschke added Reshaping Concat, Merge/Join, Stack/Unstack, Explode ExtensionArray Extending pandas with custom dtypes or arrays. labels Jul 28, 2023
mdata[value_name] = frame._values.ravel("F")
for i, col in enumerate(var_name):
# asanyarray will keep the columns as an Index
mdata[col] = np.asanyarray(frame.columns._get_level_values(i)).repeat(N)
Copy link
Member

Choose a reason for hiding this comment

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

excellent! I've got a comment in my "notes to self branch" on this line: # TODO: potential problem with losing EA dtypes?

@mroeschke mroeschke added this to the 2.1 milestone Jul 28, 2023
@mroeschke
Copy link
Member Author

Looks like tests are passing to going to merge

@mroeschke mroeschke merged commit 309f9ef into pandas-dev:main Jul 31, 2023
@mroeschke mroeschke deleted the bug/melt/ea_col branch July 31, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants