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

Add test for reverse operator at Series #694

Merged
merged 3 commits into from
Aug 27, 2019

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Aug 26, 2019

Added missing parts for the reverse operator at Series.
such as radd, rsub, and rdiv and so on.

And to make the result different from the reverse operator,
I made some changes to the data in the existing example.

@codecov-io
Copy link

codecov-io commented Aug 26, 2019

Codecov Report

Merging #694 into master will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #694      +/-   ##
==========================================
+ Coverage   93.71%   93.84%   +0.12%     
==========================================
  Files          32       32              
  Lines        5523     5523              
==========================================
+ Hits         5176     5183       +7     
+ Misses        347      340       -7
Impacted Files Coverage Δ
databricks/koalas/series.py 94.99% <ø> (+1.25%) ⬆️

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 cfaf636...2a3acaf. Read the comment docs.

@@ -217,6 +343,27 @@
Name: a, dtype: float64
"""

_rfloordiv_example_SERIES = """
Copy link
Member

Choose a reason for hiding this comment

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

@itholic, can you maybe just add the new example into _floordiv_example_SERIES? This doc looks unnecessarily getting long. For instance,

_floordiv_example_SERIES = """
Examples
--------
>>> df = ks.DataFrame({'a': [2, 2, 4, np.nan],
...                    'b': [2, np.nan, 2, np.nan]},
...                   index=['a', 'b', 'c', 'd'], columns=['a', 'b'])
>>> df
     a    b
a  2.0  2.0
b  2.0  NaN
c  4.0  2.0
d  NaN  NaN

>>> df.a.floordiv(df.b)
a    1.0
b    NaN
c    2.0
d    NaN
Name: a, dtype: float64

>>> df.a.rfloordiv(df.b)
a    0.0
b    NaN
c   -2.0
d    NaN
Name: a, dtype: float64
"""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@HyukjinKwon , The test structure was changed based on your comments. Can you confirm that I made the change when you available? Thanks for your comment.

@softagram-bot
Copy link

Softagram Impact Report for pull/694 (head commit: 2a3acaf)

⭐ 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]

@HyukjinKwon HyukjinKwon merged commit 01f01a6 into databricks:master Aug 27, 2019
@itholic itholic deleted the series_r_operator_test branch August 28, 2019 12:57
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