This PR adds a "first" reduction (aka aggregate) to SpanArray and TokenSpanArray. I've also implemented the na_value() hook on the associated dtype classes, so that empty groups in a groupby expression will get a reasonable value.
There is still some work to be done in handling the case where someone tries to roll up a list of Span objects, some of which are null values with null target text and some of which aren't, into a single SpanArray. I think that problem is best handled in a follow-on PR.
This PR adds a "first" reduction (aka aggregate) to
SpanArray
andTokenSpanArray
. I've also implemented thena_value()
hook on the associated dtype classes, so that empty groups in agroupby
expression will get a reasonable value.There is still some work to be done in handling the case where someone tries to roll up a list of
Span
objects, some of which are null values with null target text and some of which aren't, into a singleSpanArray
. I think that problem is best handled in a follow-on PR.