Skip to content

Commit 939b984

Browse files
committed
Add a test for Series.name preserved in ser.mode
1 parent c90294d commit 939b984

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/test_algos.py

+5
Original file line numberDiff line numberDiff line change
@@ -2282,6 +2282,11 @@ def test_index(self):
22822282
# algos.mode expects Arraylike, does *not* unwrap TimedeltaIndex
22832283
algos.mode(idx)
22842284

2285+
def test_ser_mode_with_name(self):
2286+
ser = Series([1, 2, 3])
2287+
ser.name = 'foo'
2288+
tm.assert_equal(ser.mode().name, 'foo')
2289+
22852290

22862291
class TestDiff:
22872292
@pytest.mark.parametrize("dtype", ["M8[ns]", "m8[ns]"])

0 commit comments

Comments
 (0)