Skip to content

[Regression] to_json doesn't export Int64 dtype correctly #32500

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
buhrmann opened this issue Mar 6, 2020 · 2 comments
Closed

[Regression] to_json doesn't export Int64 dtype correctly #32500

buhrmann opened this issue Mar 6, 2020 · 2 comments
Labels
Regression Functionality that used to work in a prior pandas version

Comments

@buhrmann
Copy link

buhrmann commented Mar 6, 2020

Code Sample

In 1.0.1:

pd.Series([0,1,None,3], dtype="Int64").to_json()
>> '{"0":0,"1":1,"2":{},"3":3}'

Problem description

Not sure if that's the desired result, notice the object instead of null value.

Expected Output

0.25.3 used to produce this:

pd.Series([0,1,None,3], dtype="Int64").to_json()
>> # '{"0":0,"1":1,"2":null,"3":3}'

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.7.6.final.0
python-bits : 64
OS : Darwin
OS-release : 19.2.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8

pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.0
pip : 20.0.2
setuptools : 45.2.0.post20200209
Cython : None
pytest : 5.3.5
hypothesis : None
sphinx : 2.4.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.1
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : None
numba : 0.48.0

@charlesdong1991 charlesdong1991 added the Regression Functionality that used to work in a prior pandas version label Mar 6, 2020
@WillAyd
Copy link
Member

WillAyd commented Mar 6, 2020

Should have already been fixed in #31748 if you want to try on master. Otherwise should be part of the 1.0.2 release

@WillAyd WillAyd closed this as completed Mar 6, 2020
@buhrmann
Copy link
Author

buhrmann commented Mar 7, 2020

Ok, great. Sorry I didn't see this when searching for previous issues.

@simonjayhawkins simonjayhawkins added this to the No action milestone May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

No branches or pull requests

4 participants