Skip to content

Fixed issue with leftover test.json file #19879

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 5 commits into from
Feb 25, 2018
Merged

Conversation

jjames34
Copy link
Contributor

df.to_json('test.json', orient='table')
new_df = pd.read_json('test.json', orient='table')

test_json_buf = io.StringIO()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, a user reading this doesn't have to care about any of the stuff with the IO buffer. They only care about writing and reading the dataframe.

I think it's best to leave the df.to_json and new_df = as it was previosly.

Then we can add a new ipython block afterwards to remove the file.

.. ipython:: python
   :suppress:

   import os
   os.remove('test.json')

@codecov
Copy link

codecov bot commented Feb 24, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@c1237f2). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #19879   +/-   ##
=========================================
  Coverage          ?   91.65%           
=========================================
  Files             ?      150           
  Lines             ?    48915           
  Branches          ?        0           
=========================================
  Hits              ?    44835           
  Misses            ?     4080           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.03% <ø> (?)
#single 41.83% <ø> (?)

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 c1237f2...7927c6a. Read the comment docs.

@jreback jreback added Docs IO JSON read_json, to_json, json_normalize labels Feb 24, 2018
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls change to using @TomAugspurger soln

@jreback jreback added this to the 0.23.0 milestone Feb 25, 2018
@jreback jreback merged commit 8f1dfa7 into pandas-dev:master Feb 25, 2018
@jreback
Copy link
Contributor

jreback commented Feb 25, 2018

thanks!

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doc build leaves behind a test.json file
3 participants