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: melt with extension dtype column #54297

Merged
merged 2 commits into from Jul 31, 2023

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
@@ -141,8 +141,7 @@ def melt(
else:
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
36 of 37 checks passed
@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.

None yet

2 participants