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

fixed issue, multiindex dataframe now created as expected #56415

Conversation

mvernooy3687
Copy link

@mvernooy3687 mvernooy3687 commented Dec 8, 2023

@@ -208,6 +208,16 @@ def to_json(
indent=indent,
).write()

if orient == "split" and isinstance(obj, DataFrame) and isinstance(obj.columns, MultiIndex):
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be handled in the writer, not after the json string is written

Copy link
Author

Choose a reason for hiding this comment

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

@mroeschke good point, I have just made a new commit with this suggested change; I moved the code to the FrameWriter class

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: JSON serialization with orient split fails roundtrip with MultiIndex
2 participants