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 describe for GroupedDataFrame #1539

Closed
wants to merge 1 commit into from

Conversation

pdeffebach
Copy link
Contributor

Resolves issue #1443 by using combine(map(describe, g)) |> groupby.

I added a test as well.

@bkamins
Copy link
Member

bkamins commented Oct 3, 2018

@nalimilan - how does it combine with #1520. especially - I understand that combine stays and does exactly the same thing?

EDIT: looking at #1520 actually something changed - right?

@nalimilan
Copy link
Member

See discussion at #1443.

@nalimilan
Copy link
Member

Is this still needed now that we have describe.(gd)?

@bkamins bkamins mentioned this pull request Jan 15, 2019
31 tasks
@pdeffebach
Copy link
Contributor Author

If your grouping column isn't one of the first or last 10 columns, then it will get cut from default DataFrame printing so you won't be able to know which group you are looking at each time. Other than that, it's good.

@nalimilan
Copy link
Member

Wait, I was confused, I meant map(describe, gd) or combine(describe, gd). In these cases the grouping column is always listed first AFAICT (I've filed #1680 about the difference between the two). Am I right?

It could still make sense to add describe(::GroupedDataFrame) in order to remove the row describing the grouping key, which doesn't add any useful information. That would also make GroupedDataFrame closer to the AbstractDataFrame interface. But that's relatively minor.

@pdeffebach
Copy link
Contributor Author

I think it is good.

  1. it works best when allgroups = true) is given, because then intermediate groups aren't omitted.
  2. I agree with Milan that we should omit the header each time we print a grouped DataFrame so it's easier to read.

@nalimilan
Copy link
Member

OK. So do you want to close this, or adjust it (like I suggested in my last comment)?

@bkamins
Copy link
Member

bkamins commented Jul 24, 2019

@pdeffebach
bump (I am trying to clean up the GitHub repo for DataFrames.jl so please let me know how you want to proceed with this PR). Thank you!

@pdeffebach
Copy link
Contributor Author

I will close this now. This has come across my mind a bit in the past few months and none of the solutions seems that appetizing. I will ponder other methods and open a new PR if I think of anything i like.

@pdeffebach pdeffebach closed this Jul 24, 2019
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.

None yet

3 participants