Skip to content

Commit 62d1f5c

Browse files
authored
CLN: Add comment on catch_warnings in agg_list_like (#43826)
1 parent 5c2c753 commit 62d1f5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/apply.py

+2
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ def agg_list_like(self) -> DataFrame | Series:
370370
# Capture and suppress any warnings emitted by us in the call
371371
# to agg below, but pass through any warnings that were
372372
# generated otherwise.
373+
# This is necessary because of https://bugs.python.org/issue29672
374+
# See GH #43741 for more details
373375
with warnings.catch_warnings(record=True) as record:
374376
new_res = colg.aggregate(arg)
375377
if len(record) > 0:

0 commit comments

Comments
 (0)