-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
to_json on multiindex does not escape strings properly #15273
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
Labels
Milestone
Comments
So this does seem wrong for the default of
|
cc @kawochen pull requests welcome to fix! |
This looks correct on master now. Could use a test
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
The result of
pd.DataFrame(True, index=pd.date_range(datetime.date(2017, 1, 20), datetime.date(2017, 1, 23)), columns=['foo', 'bar']).stack().to_json()
containsr'{"[1484870400000,"foo"]":true,"[1484870400000,"bar"]"'
,Expected Output
Whereas it should be:
r'{"[1484870400000,\"foo\"]":true,"[1484870400000,\"bar\"]"'
Output of
pd.show_versions()
pandas: 0.19.1
Cython: 0.25.1
numpy: 1.11.2
pandas_datareader: None
The text was updated successfully, but these errors were encountered: