Skip to content

BUG: read_json fails to read data fields with ":\\" #37074

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

Closed
1 task
dhanesh123in opened this issue Oct 12, 2020 · 2 comments
Closed
1 task

BUG: read_json fails to read data fields with ":\\" #37074

dhanesh123in opened this issue Oct 12, 2020 · 2 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@dhanesh123in
Copy link

  • [x ] I have checked that this issue has not already been reported.

  • [x ] I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

import pandas as pd
d = '{"columns":["col 1","col 2"], "index":["row 1","row 2"], "data":[["random s3://xyz/abc","wherever https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html"],["c","d"]]}'
pd.read_json(d, orient='split')

Problem description

This leads to an error in pandas 1.1.x and works fine in <=1.0.5.

Expected Output

                     col 1                                              col 2
row 1  random s3://xyz/abc  wherever https://pandas.pydata.org/pandas-docs...
row 2                    c                                                  d

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit : db08276 python : 3.7.4.final.0 python-bits : 64 OS : Darwin OS-release : 19.6.0 Version : Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 machine : x86_64 processor : i386 byteorder : little LC_ALL : en_US.UTF-8 LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.1.3
numpy : 1.19.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.4.0
Cython : 0.29.13
pytest : 5.2.1
hypothesis : 5.10.4
sphinx : 2.2.0
blosc : None
feather : None
xlsxwriter : 1.2.1
lxml.etree : 4.4.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.8.0
pandas_datareader: None
bs4 : 4.8.0
bottleneck : 1.2.1
fsspec : 0.8.3
fastparquet : None
gcsfs : None
matplotlib : 3.0.3
numexpr : 2.7.0
odfpy : None
openpyxl : 3.0.0
pandas_gbq : None
pyarrow : 0.17.1
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.13
tables : 3.5.2
tabulate : 0.8.6
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.45.1

@dhanesh123in dhanesh123in added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 12, 2020
@dhanesh123in dhanesh123in changed the title BUG: read_json fails to read data fields with ":\\" BUG: read_json fails to read data fields with ":\\" Oct 12, 2020
@jreback
Copy link
Contributor

jreback commented Oct 12, 2020

this is duplicate pls search the tracker

@dhanesh123in
Copy link
Author

Apologies, duplicate of #36271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants