Skip to content
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

DataFrame.to_json #238

Merged
merged 7 commits into from
May 11, 2019
Merged

DataFrame.to_json #238

merged 7 commits into from
May 11, 2019

Conversation

garawalid
Copy link
Contributor

@garawalid garawalid commented May 5, 2019

add to_json(). Part of #169

@codecov-io
Copy link

codecov-io commented May 5, 2019

Codecov Report

Merging #238 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #238      +/-   ##
==========================================
+ Coverage   93.55%   93.57%   +0.02%     
==========================================
  Files          33       33              
  Lines        3272     3286      +14     
==========================================
+ Hits         3061     3075      +14     
  Misses        211      211
Impacted Files Coverage Δ
databricks/koalas/missing/frame.py 100% <ø> (ø) ⬆️
...tabricks/koalas/tests/test_dataframe_conversion.py 100% <100%> (ø) ⬆️
databricks/koalas/frame.py 94.81% <100%> (+0.04%) ⬆️

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 edc6074...d05170a. Read the comment docs.

@garawalid garawalid changed the title add to_json Add to_json May 5, 2019
@HyukjinKwon HyukjinKwon changed the title Add to_json Add to_json in DataFrame May 6, 2019
@HyukjinKwon HyukjinKwon changed the title Add to_json in DataFrame DataFrame.to_json May 7, 2019
@garawalid
Copy link
Contributor Author

garawalid commented May 8, 2019

I skiped this test df.to_json(orient='table') because the output is different in Pandas 0.23.4 with python 3.5 and Pandas 0.24.2 with python 3.6.

Expected:
    '{"schema": {"fields":[{"name":"index","type":"string"},{"name":"col 1","type":"string"},{"name":"col 2","type":"string"}],"primaryKey":["index"],"pandas_version":"0.20.0"}, "data": [{"index":"row 1","col 1":"a","col 2":"b"},{"index":"row 2","col 1":"c","col 2":"d"}]}'
Got:
    '{"schema": {"fields":[{"name":"index","type":"string"},{"name":"col 1","type":"string"},{"name":"col 2","type":"string"}],"pandas_version":"0.20.0","primaryKey":["index"]}, "data": [{"index":"row 1","col 1":"a","col 2":"b"},{"index":"row 2","col 1":"c","col 2":"d"}]}'

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Looks good otherwise

@HyukjinKwon
Copy link
Member

oops, can you rebase this, @garawalid ? looks your csv PR merge caused a conflict here :).

@garawalid
Copy link
Contributor Author

@HyukjinKwon done!

@HyukjinKwon HyukjinKwon merged commit 397f76f into databricks:master May 11, 2019
@garawalid garawalid deleted the to_json branch May 11, 2019 13:13
athena15 pushed a commit to athena15/koalas that referenced this pull request May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants