-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorNuisance ColumnsIdentifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.applyIdentifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.applyNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.
Milestone
Description
Based on tests.frame.test_analytics.test_any_all_np_func
ser = pd.Series([0, 1], dtype="category", name="A")
df = ser.to_frame()
>>> ser.all().
TypeError: Categorical cannot perform the operation all
>>> df.all().item()
False
Whats happening here is the DataFrame case is calling self.values
which casts to int64 (avoidable with 2D EAs...).
If instead we refactor (xref #35881) to operate blockwise, this block is ignored, so we end up getting the result we'd get on an empty DataFrame, i.e. True. (xref #28900 ignoring failures is a footgun).
Expected Behavior: as long as have ignore_failures, df.all()
should be True
Metadata
Metadata
Assignees
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorNuisance ColumnsIdentifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.applyIdentifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.applyNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.