-
Notifications
You must be signed in to change notification settings - Fork 368
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
Grouped describe fails or "clashes" with StatsBase #2952
Comments
I should have used |
|
Of course if you want to keep the stats in a single column, without expanding then you can do:
|
Awesome, and thanks for the quick response! I suppose this is not feasible, but maybe we could deprecate |
Is this #1443 what you would want? I do not think we will deprecate |
I'm not sure that I understand the direction #1443 ended up aiming for. Interesting that julia> combine(groupby(df, [:a, :b]), :duration => describe => AsTable)
4×10 DataFrame
Row │ a b duration_mean duration_min duration_q25 ...
│ Bool Int64 Float64 Float64 Float64 ...
─────┼───────────────────────────────────────────────────────────
1 │ false 2 -0.5431 -1.27231 -0.86726 -0.462214 ...
2 │ false 3 0.743789 0.175907 0.485023 ...
3 │ true 1 1.3331 1.3331 1.3331 ...
4 │ true 2 -0.212513 -0.718772 -0.693783 ... similar to I'm just now noticing that I was also expecting Edit: I guess I'm confusing these concepts with the broadcasted |
Yes that's what I'd like to do. We should check whether that can be done in a completely non-breaking way or at least with minor breakage. |
How do I use
groupby
anddescribe
together properly? I was trying to describe duration values based on some category. Having onlyDataFrames
loaded, it fails due to a missing method fordescribe
:StatsBase
(which got loaded byCairoMakie
in my case) for example defines above method, but incompatible with my intended use case:I tried variations with
AsTable(:duration)
, but I couldn't get it working. How would you guys approach this? 🙂Maybe one could define a method for
describe(::NamedTuple)
to get this working withAsTable
, but I'm afraid that would conflict with the use case ofStatsBase
.The text was updated successfully, but these errors were encountered: