File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -8747,11 +8747,6 @@ def _reduce(
8747
8747
cols = self .columns [~ dtype_is_dt ]
8748
8748
self = self [cols ]
8749
8749
8750
- any_object = np .array (
8751
- [is_object_dtype (dtype ) for dtype in own_dtypes ],
8752
- dtype = bool ,
8753
- ).any ()
8754
-
8755
8750
# TODO: Make other agg func handle axis=None properly GH#21597
8756
8751
axis = self ._get_axis_number (axis )
8757
8752
labels = self ._get_agg_axis (axis )
@@ -8778,12 +8773,7 @@ def _get_data() -> DataFrame:
8778
8773
data = self ._get_bool_data ()
8779
8774
return data
8780
8775
8781
- if numeric_only is not None or (
8782
- numeric_only is None
8783
- and axis == 0
8784
- and not any_object
8785
- and not self ._mgr .any_extension_types
8786
- ):
8776
+ if numeric_only is not None :
8787
8777
# For numeric_only non-None and axis non-None, we know
8788
8778
# which blocks to use and no try/except is needed.
8789
8779
# For numeric_only=None only the case with axis==0 and no object
You can’t perform that action at this time.
0 commit comments