Skip to content

API: raise notImplementedError on to_json(orient='table') for a DataFrame with a MultiIndex #16095

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

Merged
merged 1 commit into from
Apr 22, 2017

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Apr 22, 2017

xref #15996

@jreback jreback added IO JSON read_json, to_json, json_normalize Output-Formatting __repr__ of pandas objects, to_string labels Apr 22, 2017
@jreback jreback added this to the 0.20.0 milestone Apr 22, 2017
@jreback
Copy link
Contributor Author

jreback commented Apr 22, 2017

@TomAugspurger

I guess should do this for now (unless you can fix :>)

@TomAugspurger
Copy link
Contributor

Yeah, probably best, at least for now...

Let's leave the issue open though, and relabel it as a general "what should the tableschema repr provide when all else fails"

@jreback
Copy link
Contributor Author

jreback commented Apr 22, 2017

cc @rgbkrk

@jreback jreback merged commit 5b07d02 into pandas-dev:master Apr 22, 2017
@codecov
Copy link

codecov bot commented Apr 22, 2017

Codecov Report

Merging #16095 into master will decrease coverage by 50.48%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #16095       +/-   ##
===========================================
- Coverage   90.84%   40.35%   -50.49%     
===========================================
  Files         159      159               
  Lines       50776    50777        +1     
===========================================
- Hits        46128    20492    -25636     
- Misses       4648    30285    +25637
Flag Coverage Δ
#multiple ?
#single 40.35% <50%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/io/json/json.py 17.27% <50%> (-73.01%) ⬇️
pandas/formats/style.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/json.py 0% <0%> (-100%) ⬇️
pandas/parser.py 0% <0%> (-100%) ⬇️
pandas/tslib.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-90.67%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.28%) ⬇️
pandas/core/tools/numeric.py 10.44% <0%> (-89.56%) ⬇️
pandas/io/json/normalize.py 8.16% <0%> (-88.78%) ⬇️
... and 111 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0bd908...908d0f0. Read the comment docs.

@rgbkrk
Copy link
Contributor

rgbkrk commented Apr 22, 2017

Thanks, seems sensible. This should end up spitting out HTML while also throwing the exception, which should be fine. They'll have to toggle off the table schema mode.

pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO JSON read_json, to_json, json_normalize Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants