Skip to content

Commit f08c782

Browse files
committed
Minor refactor
1 parent bbece5e commit f08c782

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/apply.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -367,17 +367,16 @@ def agg_list_like(self) -> DataFrame | Series:
367367
except (TypeError, DataError):
368368
failed_names.append(col)
369369
except ValueError as err:
370-
failed_names.append(col)
371370
# cannot aggregate
372371
if "Must produce aggregated value" in str(err):
373372
# raised directly in _aggregate_named
374-
pass
373+
failed_names.append(col)
375374
elif "no results" in str(err):
376375
# reached in test_frame_apply.test_nuiscance_columns
377376
# where the colg.aggregate(arg) ends up going through
378377
# the selected_obj.ndim == 1 branch above with arg == ["sum"]
379378
# on a datetime64[ns] column
380-
pass
379+
failed_names.append(col)
381380
else:
382381
raise
383382
else:

0 commit comments

Comments
 (0)