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

Issue with ks.merge to Series #818

Merged
merged 7 commits into from
Sep 24, 2019
Merged

Conversation

thoo
Copy link
Contributor

@thoo thoo commented Sep 22, 2019

Fix #817

Also add pytests for merging ks.DataFrame to ks.Series.

@codecov-io
Copy link

codecov-io commented Sep 22, 2019

Codecov Report

Merging #818 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #818     +/-   ##
=========================================
+ Coverage   94.25%   94.36%   +0.1%     
=========================================
  Files          32       32             
  Lines        5853     5855      +2     
=========================================
+ Hits         5517     5525      +8     
+ Misses        336      330      -6
Impacted Files Coverage Δ
databricks/koalas/frame.py 96.89% <100%> (+0.14%) ⬆️
databricks/koalas/plot.py 94.29% <0%> (+0.95%) ⬆️

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 baffe5d...a1f0937. Read the comment docs.

@thoo
Copy link
Contributor Author

thoo commented Sep 22, 2019

The reason Travis CI is failing is pandas.merge added Series objects in version 0.24.0 and one of the tests was run with pandas version 0.23.

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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

@thoo thanks for working on this.
In that case, we can skip tests with LooseVersion.
Otherwise, LGTM.


# suffix
check(lambda left, right: left.merge(right, suffixes=['_left', '_right'], how='outer',
left_index=True, right_index=True), right_ks, right_ps)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's skip tests when pandas is older than 0.24. See the example with LooseVersion in test_groupby.py.

* upstream/master:
  Updated the koalas logo in readme.md
  Adding koalas-logo without label
  Adding Koalas logo to readme
  Adding koalas logo
  Clean pandas usage in frame.agg (databricks#821)
  Implement Series.aggregate and agg (databricks#816)
  Raise a more helpful error for duplicated columns in Join (databricks#820)
check(lambda left, right: left.merge(right, how=how), right_ks, right_ps)
check(lambda left, right: left.merge(right, left_on='x', right_on='x', how=how),
# pd.DataFrame.merge with Series is implemented since version 0.24.0
if LooseVersion(pd.__version__) > LooseVersion("0.24.2"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: shall we use 0.24.0 if pandas supports since then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

@softagram-bot
Copy link

Softagram Impact Report for pull/818 (head commit: a1f0937)

⭐ Change Overview

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

📄 Full report

Impact Report explained. Give feedback on this report to [email protected]

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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

LGTM.

@ueshin
Copy link
Collaborator

ueshin commented Sep 24, 2019

Thanks! merging.

@ueshin ueshin merged commit 2b80dcf into databricks:master Sep 24, 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.

Bug in merge dataframe to series.
4 participants