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 @@ -8746,11 +8746,6 @@ def _reduce(
8746
8746
cols = self .columns [~ dtype_is_dt ]
8747
8747
self = self [cols ]
8748
8748
8749
- any_object = np .array (
8750
- [is_object_dtype (dtype ) for dtype in own_dtypes ],
8751
- dtype = bool ,
8752
- ).any ()
8753
-
8754
8749
# TODO: Make other agg func handle axis=None properly GH#21597
8755
8750
axis = self ._get_axis_number (axis )
8756
8751
labels = self ._get_agg_axis (axis )
@@ -8777,12 +8772,7 @@ def _get_data() -> DataFrame:
8777
8772
data = self ._get_bool_data ()
8778
8773
return data
8779
8774
8780
- if numeric_only is not None or (
8781
- numeric_only is None
8782
- and axis == 0
8783
- and not any_object
8784
- and not self ._mgr .any_extension_types
8785
- ):
8775
+ if numeric_only is not None :
8786
8776
# For numeric_only non-None and axis non-None, we know
8787
8777
# which blocks to use and no try/except is needed.
8788
8778
# 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