Open
Description
Inspecting the various groupby ops, I think the following are cases where we should have numeric_only
.
- agg (API: GroupBy.agg() numeric_only deprecation with custom function #50538)
- aggregate (API: GroupBy.agg() numeric_only deprecation with custom function #50538)
- apply
- cumprod (ENH: Add
numeric_only
toDataFrame.cum*
methods #53072) - cumsum (ENH: Add
numeric_only
toDataFrame.cum*
methods #53072) - diff
- pct_change
- rank (ENH: No numeric_only argument for pandas.core.groupby.GroupBy.rank() #44438)
- transform
- ohlc
The following methods make sense to have numeric_only
, but won't fail on any input (or hashable input for nunique and value_counts), and so I think it's okay if they don't. But is still nice to have.
- all
- any
- bfill
- count
- ffill
- nunique
- value_counts
The following methods should not get a numeric_only
argument. They fall into a few typical camps: filters, plotting, or they do not depend on the columns (e.g. cumcount and size)
- boxplot
- cumcount
- describe # Handled by
include="all"
- filter
- head
- hist
- nth
- pipe
- plot
- shift
- size
- tail
- take