-
Notifications
You must be signed in to change notification settings - Fork 367
DataFrameGroupBy.describe #1168
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
Merged
HyukjinKwon
merged 9 commits into
databricks:master
from
deepyaman:dataframegroupby-describe
Jan 16, 2020
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4a02bcd
Add `DataFrameGroupBy.describe` with helper change
deepyaman c216aae
Reorder columns lexicographically (agg col, stats)
deepyaman 77f07d5
Check/ensure that non-percentile columns are equal
deepyaman bc5d79d
Undo unnecessarily-complicated `astype` subsetting
deepyaman 72e810f
Check that percentile columns equal `pdf.quantile`
deepyaman 1ea2db4
Merge branch 'master' into dataframegroupby-describe
deepyaman 69cc56c
Fix pycodestyle (line too long) :white_check_mark:
deepyaman 086e391
Move ``DataFrameGroupBy.describe`` to proper class
deepyaman 707f1eb
Replace potentially-inefficient `tolist` operation
deepyaman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line seems a little danger since it can potentially raise memory issue such like OOM,
(because
tolist()loads all the data into the single driver's memory.)so i think maybe we can use
content.to_frame(), or should find another way.or we can simply just don't support quartiles for now since memory issue written above with describing proper notice to docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can just get items from the "quartiles" column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itholic @ueshin Hey! Sorry it's taking me a while to make the requested changes. I figured out a way to refactor this using
_column_op; will it work? I'm still usingto_numpy, though, only because Koalas doesn't allow constructing a DataFrame from a column-Series mapping yet.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deepyaman
Hi Deepyaman! thanks for your continued efforts here.
Basically, for handling DataFrame of Koalas efficiently,
we usually use internal spark DataFrame (
sdfin short, and you can get bykdf._sdforkdf._internal.sdf), not directly Koalas API.I made some another way of implementation using
sdffor you below.(I can't say that this is a perfect & good quality code since it's very roughly implemented and not enough tested, but maybe it will help you to understand Koalas' internal processing even just a bit)
and, now implementation seems like invokes job many times like the below.
we can reduce them via handling internal frame properly like the below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itholic Thank you for the feedback. I'll try to rewrite it following your suggestions above and get back to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deepyaman My pleasure :) Hope it helps you!