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

Support SeriesGroupBy.filter. #1483

Merged
merged 3 commits into from
May 12, 2020
Merged

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented May 12, 2020

Adding SeriesGroupBy.filter.

>>> df = ks.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar', 'foo', 'bar'], 'B' : [1, 2, 3, 4, 5, 6], 'C' : [2.0, 5., 8., 1., 2., 9.]})
>>> df.B.groupby(df.A).filter(lambda x: x.mean() > 3.)
1    2
3    4
5    6
Name: B, dtype: int64

@ueshin ueshin requested a review from HyukjinKwon May 12, 2020 00:54
@ueshin
Copy link
Collaborator Author

ueshin commented May 12, 2020

This is based on #1480. Please review it first.

@ueshin ueshin changed the title Add SeriesGroupBy.filter. Support SeriesGroupBy.filter. May 12, 2020
@codecov-io
Copy link

codecov-io commented May 12, 2020

Codecov Report

Merging #1483 into master will decrease coverage by 0.00%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1483      +/-   ##
==========================================
- Coverage   93.82%   93.81%   -0.01%     
==========================================
  Files          36       36              
  Lines        8433     8442       +9     
==========================================
+ Hits         7912     7920       +8     
- Misses        521      522       +1     
Impacted Files Coverage Δ
databricks/koalas/missing/groupby.py 100.00% <ø> (ø)
databricks/koalas/groupby.py 89.40% <83.33%> (+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 4204b4c...7a7acb7. Read the comment docs.

@itholic
Copy link
Contributor

itholic commented May 12, 2020

Looks good to me If #1480 is approved.

@ueshin
Copy link
Collaborator Author

ueshin commented May 12, 2020

Thanks! I'd merge this now. Please feel free to leave a comment if any.

@ueshin ueshin merged commit deef167 into databricks:master May 12, 2020
@ueshin ueshin deleted the series_groupby_filter branch May 12, 2020 18:10
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