Skip to content

groupby still seems slow, even with flox. Am I doing it right? #7566

Closed Answered by dcherian
flyaflya asked this question in Q&A
Discussion options

You must be logged in to vote

We haven't enabled first, last with flox yet, I need to think about how to do it with dask. I would just use pandas since you can.

Or go to flox directly if you really want array support (it'll work for numpy arrays; and nanfirst will work for numpy and dask)

flox.xarray.xarray_reduce(da, by, func="first")

EDIT: Adding some tests to flox would be a very helpful contribution! (xarray-contrib/flox#29)

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by dcherian
Comment options

You must be logged in to vote
2 replies
@keewis
Comment options

@flyaflya
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@dcherian
Comment options

@flyaflya
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants