-
Notifications
You must be signed in to change notification settings - Fork 370
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
describe doesn't follow the source => function => name convention #2385
Comments
Well - we were aware that we left this case.
Having said that I would not oppose to change it prior to 1.0 release as this is a non-core functionality. |
OK, I must have forgotten that then. I'd be inclined to change this, as it's quite similar to |
As I have said - I would not oppose it. @oxinabox, @quinnj, @ararslan - do you have any opinion here? (I am mostly asking about the approach to "breaking things" in cases like here - we have a case of a relatively unimportant feature that is a bit inconsistent with the rest of the design; so - it would be better to change it but it is breaking). In general this is a last call to break it in 0.22 release, as in general I will oppose any breaking changes to ensure the stability of the API of DataFrames.jl as I believe this is what we need to start ensuring if we want to have a wider adoption. |
If we want to avoid breakage, we could also allow both orders (since there's no ambiguity), but recommend |
Actually I would prefer to be breaking, but want to confirm the policy (i.e. allow small breakages for 0.22 like this one to clean things up; do not allow breaking changes after 1.0 release at all 😄) |
My preference is to change the syntax to make it consistent with |
If you’re going to be breaking, would not it be nicer to have cols as the default arg, and stats as the kwarg? That would be nice to be able to do describe(df, :x) similarly to groupby(df, :x) or select(df, :x) |
|
Is that really the case? We have lots of cases where it's a positional argument ( |
Ah - sorry - you are right. I was thinking about these functions and I knew we called the argument So @matthieugomez is what you want this:?
but it would greatly complicate the syntax of |
Yeah. I was hoping we could make both |
@matthieugomez - what do you think given these considerations (or in general - what would be your proposal exactly)? Thank you! |
I like what @matthieugomez suggested. It's much closer to stata where I think My ideal behavior is probably,
Where the first one just returns the results of |
The problem with this is that Also note that currently you can write:
do you both feel that having to write |
That's fine. We should change to |
I've said this before but we should also change |
Yes - I will make a PR changing this order. |
see #2401 |
What we could do is require wrapping symbols in a vector or |
@bkamins As you suggest, I was thinking of a kwarg stats that would be either a Union{Symbol, Pair}, or a vector of Union{Symbol, Pair}, as you suggest. Beyond consistency, my impression is that 99% of the time, people will use |
Interesting - I do exactly the opposite - rather collecting data for all columns but custom functions. My major use case of describe is to quickly check if I read-in a |
No |
OK. That could be a reason to change that argument then. OTOH we made |
This is indeed a coincidence 😄. Let us wait a bit as maybe other people will voice their opinion (or @matthieugomez changes his opinion given this issue 😄) |
I would like to revive this, I think |
The only issue is that you can write (I do not have a strong opinion here, but just want to understand the rationale) |
I think mostly, those are a lot of brackets and a lot of characters to type. If you use stata you are using
all the time interacitvely, it's second nature. So making it super easy to type is important. |
I am closing this as for 1.0 we will not introduce breaking changes with positional and kwargs (still we implemented the original proposal to use |
I've just realized that
describe
takesname => function
pairs, which is totally inconsistent withselect
,transform
andcombine
. I think we should deprecate the current syntax and move tofunction => name
.The text was updated successfully, but these errors were encountered: