Skip to content

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Apr 6, 2020

This PR proposes add Series.divmod() and Series.rdivmod()

It simply put Series.div() and Series.mod() together into the single tuple.

>>> kser
0    100.0
1      NaN
2    300.0
3      NaN
4    500.0
Name: Koalas, dtype: float64

>>> kser.divmod(150)
(0    0.666667
1         NaN
2    2.000000
3         NaN
4    3.333333
Name: Koalas, dtype: float64, 0    100.0
1      NaN
2      0.0
3      NaN
4     50.0
Name: Koalas, dtype: float64)

>>> kser.rdivmod(150)
(0    1.5
1    NaN
2    0.5
3    NaN
4    0.3
Name: Koalas, dtype: float64, 0     50.0
1      NaN
2    150.0
3      NaN
4    150.0
Name: Koalas, dtype: float64)

@itholic
Copy link
Contributor Author

itholic commented Apr 8, 2020

I'll come back here after finishing #1399

@itholic itholic changed the title Add divmod & rdivmod for Series [WIP] Add divmod & rdivmod for Series Apr 8, 2020
@itholic itholic changed the title [WIP] Add divmod & rdivmod for Series Add divmod & rdivmod for Series Apr 24, 2020
@itholic
Copy link
Contributor Author

itholic commented Apr 24, 2020

Since #1399 has been resolved, I come back over here and rebased code to the master.

@codecov-io
Copy link

codecov-io commented Apr 27, 2020

Codecov Report

Merging #1397 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1397   +/-   ##
=======================================
  Coverage   93.88%   93.88%           
=======================================
  Files          36       36           
  Lines        8373     8375    +2     
=======================================
+ Hits         7861     7863    +2     
  Misses        512      512           
Impacted Files Coverage Δ
databricks/koalas/missing/series.py 100.00% <ø> (ø)
databricks/koalas/series.py 96.37% <100.00%> (+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 a9b4147...7588b09. Read the comment docs.

@itholic
Copy link
Contributor Author

itholic commented May 18, 2020

I think this PR is ready to get review since all related issues are resolved! :)

@HyukjinKwon HyukjinKwon merged commit 0267539 into databricks:master May 19, 2020
@itholic itholic deleted the s_divmod branch May 29, 2020 00:50
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.

3 participants