File tree 3 files changed +4
-1
lines changed
3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Fixed regressions
16
16
- Fixed performance regression in :meth: `Series.isin ` when ``values `` is empty (:issue: `49839 `)
17
17
- Fixed regression in :meth: `DataFrameGroupBy.transform ` when used with ``as_index=False `` (:issue: `49834 `)
18
18
- Enforced reversion of ``color `` as an alias for ``c `` and ``size `` as an alias for ``s `` in function :meth: `DataFrame.plot.scatter ` (:issue: `49732 `)
19
+ - Fixed regression in :meth: `SeriesGroupBy.apply ` setting a ``name `` attribute on the result if the result was a :class: `DataFrame ` (:issue: `49907 `)
19
20
-
20
21
21
22
.. ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -411,7 +411,8 @@ def _wrap_applied_output(
411
411
not_indexed_same = not_indexed_same ,
412
412
override_group_keys = override_group_keys ,
413
413
)
414
- result .name = self .obj .name
414
+ if isinstance (result , Series ):
415
+ result .name = self .obj .name
415
416
return result
416
417
else :
417
418
# GH #6265 #24880
Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ def f(piece):
335
335
result = grouped .apply (f )
336
336
337
337
assert isinstance (result , DataFrame )
338
+ assert not hasattr (result , "name" ) # GH49907
338
339
tm .assert_index_equal (result .index , ts .index )
339
340
340
341
You can’t perform that action at this time.
0 commit comments