-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementGroupbyMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
Is your feature request related to a problem?
The level keyword in sum is marked as deprecated, but the suggested replacement with groupby.sum
does not support skipna, therefore, some behaviours are impossible to replicate easily.
Describe the solution you'd like
grouby.sum
should accept the skipna=False keyword,
API breaking implications
Currently the API is inconsistent, since
df.sum(axis=1, level=0, skipna=False)
has no equivalent since df.groupby(axis=1, level=0).sum(skipna=False)
is not available.
Describe alternatives you've considered
One can of course do: df.groupby(axis=1, level=0).apply(lambda x : x.sum(axis=1, skipna=False))
but this cannot be the intended use.
Additional context
# Your code here, if applicable
Metadata
Metadata
Assignees
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorDuplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementGroupbyMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action