Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Oct 31, 2019

This PR implement min, max, sum and mean of Expanding in Series and DataFrame

>>> import databricks.koalas as ks
>>> ks.Series([2, 3, float("nan"), 10]).expanding().sum()
0     2.0
1     5.0
2     5.0
3    15.0
Name: 0, dtype: float64
>>> ks.DataFrame({'a': [1, float('nan'), 3], 'b': [1.0, 2.0, 3.0]}).expanding().sum()
     a    b
0  1.0  1.0
1  1.0  3.0
2  4.0  6.0

relates to #984 977

@HyukjinKwon HyukjinKwon force-pushed the expanding_sum_min_max_mean branch from 5c6c9fa to e21b76c Compare October 31, 2019 08:19
@HyukjinKwon HyukjinKwon requested a review from ueshin October 31, 2019 08:23
return partial(property_or_func, self)
raise AttributeError(item)

def _apply_as_series_or_frame(self, func):
Copy link
Member Author

@HyukjinKwon HyukjinKwon Oct 31, 2019

Choose a reason for hiding this comment

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

Should I maybe separate Expanding into SeriesExpandng and FrameExpanding .. ? not sure yet. pandas seems having Expanding alone.

@HyukjinKwon HyukjinKwon changed the title Implement min, max, sum and mean of Expanding in Series and DataFrame [WIP] Implement min, max, sum and mean of Expanding in Series and DataFrame Oct 31, 2019
@HyukjinKwon HyukjinKwon force-pushed the expanding_sum_min_max_mean branch 2 times, most recently from 4debef0 to e3ef96a Compare November 1, 2019 05:39
@HyukjinKwon HyukjinKwon changed the title [WIP] Implement min, max, sum and mean of Expanding in Series and DataFrame Implement min, max, sum and mean of Expanding in Series and DataFrame Nov 1, 2019
@codecov-io
Copy link

codecov-io commented Nov 1, 2019

Codecov Report

Merging #985 into master will decrease coverage by 0.04%.
The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #985      +/-   ##
==========================================
- Coverage   94.83%   94.79%   -0.05%     
==========================================
  Files          34       34              
  Lines        6527     6546      +19     
==========================================
+ Hits         6190     6205      +15     
- Misses        337      341       +4
Impacted Files Coverage Δ
databricks/koalas/missing/window.py 100% <ø> (ø) ⬆️
databricks/koalas/generic.py 96.17% <ø> (ø) ⬆️
databricks/koalas/window.py 90.9% <90%> (-2.15%) ⬇️

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 6de340d...0785723. Read the comment docs.

@HyukjinKwon HyukjinKwon force-pushed the expanding_sum_min_max_mean branch from e3ef96a to 0785723 Compare November 5, 2019 01:17
@softagram-bot
Copy link

Softagram Impact Report for pull/985 (head commit: 0785723)

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

@HyukjinKwon
Copy link
Member Author

Let me merge this to proceed forward .. I'm still touching the codes around here so please let me know if you guys have more comments.

@HyukjinKwon HyukjinKwon merged commit 4e85e8b into databricks:master Nov 5, 2019
@HyukjinKwon HyukjinKwon deleted the expanding_sum_min_max_mean branch November 6, 2019 02:20
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