-
Notifications
You must be signed in to change notification settings - Fork 126
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
compute mode on grouped DataFrame #452
Comments
Hi @kylewhite21! So inside Because we are building a query, we don't have access to a handful of functions but that unfortunately include frequencies. Luckily, I believe we can implement You could also summarize off-band:
|
@josevalim is there a reason we're not using this? I just noticed we don't have it for eager either. Putting together a PR now. @kylewhite21 would a mode function solve the problem? Edit: I think the challenge is that there can be multiple modes or none. I'm investigating how pandas and dplyr handle it, especially with groups. |
@josevalim makes sense. I'd be happy to compute the mode out of band, but I need it to work on the groupings ( @cigrainger a mode function would solve my problem if it works on grouped DataFrames. I saw the comments in #453 and the need for a list. 👍 Thanks for the quick replies! |
I have much more experience with R and Python and love the "dataframe" support in Elixir.
I'm trying to compute the mode in a grouped DataFrame and hit a error with calling
frequencies/1
on aLazySeries
. (I also can't callto_list/1
to do the mode in native Elixir.) A minimal working example is below.I have some ideas for workarounds outside of
Explorer
, but don't want to re-implement the grouping. Or perhaps there is a way to do it withinExplorer
currently.Any ideas?
The text was updated successfully, but these errors were encountered: