Closed ianthomas23 closed 1 year ago
This is ready for review. After this is merged we will be in a position to start working on holoviews to use this functionality for improved inspection.
Looks great! Can you provide a section for the user guide showing how to use this in an example?
Yes, I'll do that in a separate PR.
This is built on top of PR #1155 and ideally that should be merged first, then this rebased on top of it. I am submitting it early to run it through CI.
It supports the use of the
where
reduction without specifying thelookup_column
argument to return an agg containing the corresponding row indexes from the pandas/dask DataFrame. The agg returned isint64
with-1
to represent missing values. Implementing the row index for pandas DataFrames is quite simple, for dask DataFrames the implementation is more complicated as this information is not normally available and theindex
of the DataFrame cannot be relied upon in all scenarios.Demo code:
which outputs
selector
reductions thatwhere
supports in this way arefirst
,last
,max
andmin
. For dask DataFrames this is justmax
andmin
so far asfirst
andlast
do not have any dask implementation.