Closed
Description
Code Sample, a copy-pastable example if possible
import pandas as pd
import datetime
pd.read_json(pd.DataFrame(True, index=pd.date_range(datetime.date(2017, 1, 20), datetime.date(2017, 1, 23)), columns=['foo', 'bar']).stack().to_json())
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()
contains
r'{"[1484870400000,"foo"]":true,"[1484870400000,"bar"]"'
,
Expected Output
Whereas it should be:
r'{"[1484870400000,\"foo\"]":true,"[1484870400000,\"bar\"]"'
Output of pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.5.final.0
python-bits: 32
OS: Windows
machine: AMD64
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.19.1
Cython: 0.25.1
numpy: 1.11.2
pandas_datareader: None