Reductions for ExtensionArray · Issue #22346 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@TomAugspurger

Description

@TomAugspurger

Creeping up to this in #22345

A few questions

  1. What should this look like for EA authors? What helpers can / should we provide?
  2. How does this affect users? Specifically, assuming IntegerArray implements reductions, what's the dtype here?

In [11]: df = pd.DataFrame({"A": ['a', 'b', 'a'], "B": pd.core.arrays.IntegerArray([1, 2, 3])})

In [12]: df.groupby("A").B.min().dtype

Is it int64, or should we preserve Int64?

We can also discuss transforms ( cumulative operations like cumsum, maybe things like .shift).