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

BUG&TST: Fix area plot for Series and add test #704

Merged

Conversation

charlesdong1991
Copy link
Contributor

@charlesdong1991 charlesdong1991 commented Aug 27, 2019

There seems a little bug in SamplePlot that failed area plot. It is due to after sampling, since scol is not assigned, it will return a full DataFrame instead of Series. And looks like area plot turns good as well after fixing it.

Screen Shot 2019-08-27 at 10 21 03 PM

Before the bug fixing, the area plot looks like:

Screen Shot 2019-08-27 at 10 40 23 PM

@softagram-bot
Copy link

Softagram Impact Report for pull/704 (head commit: aa9fed6)

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Give feedback on this report to [email protected]

@charlesdong1991 charlesdong1991 changed the title BUG&TST: Fix area plot for Series BUG&TST: Fix area plot for Series and add test Aug 27, 2019
@codecov-io
Copy link

codecov-io commented Aug 27, 2019

Codecov Report

Merging #704 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #704      +/-   ##
==========================================
+ Coverage   93.86%   93.86%   +<.01%     
==========================================
  Files          32       32              
  Lines        5544     5545       +1     
==========================================
+ Hits         5204     5205       +1     
  Misses        340      340
Impacted Files Coverage Δ
databricks/koalas/plot.py 94.75% <100%> (+0.01%) ⬆️

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 a449894...aa9fed6. Read the comment docs.

@HyukjinKwon
Copy link
Member

Thanks!!!!

@HyukjinKwon HyukjinKwon merged commit 536ea18 into databricks:master Aug 28, 2019
@@ -90,8 +90,9 @@ def get_sampled(self, data):
sampled = data._sdf.sample(fraction=float(self.fraction))
return DataFrame(data._internal.copy(sdf=sampled)).to_pandas()
elif isinstance(data, Series):
scol = data._kdf._internal.data_scols[0]
Copy link
Member

Choose a reason for hiding this comment

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

oops, it should be data._scol so that it respects the expression stored in Series. Let me fix it quick.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops... i didn't see this option in Series.py... my bad, sorry for this, i see it is not fixed yet, i will just create a small PR to fix it quick and validate if plot still works. @HyukjinKwon

Copy link
Member

Choose a reason for hiding this comment

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

ah, I just made a one line fix just now - I found this comment after opening the PR :D. It's fine!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😅 oh, sorry, i waked up and saw the comment, and found it hadn't been fixed yet in master branch, i thought you might forget this issue, so i opened a small PR for this ... but thanks for the tip, appreciate it!

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