Skip to content

Commit 11dff0d

Browse files
lodagroy-p
authored and
y-p
committed
TST: Series repr fails when name is tuple holding non string-type #2051
1 parent fb3e8e2 commit 11dff0d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pandas/tests/test_series.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1011,9 +1011,16 @@ def test_repr(self):
10111011
ots[::2] = None
10121012
repr(ots)
10131013

1014-
# tuple name, e.g. from hierarchical index
1015-
self.series.name = ('foo', 'bar', 'baz')
1016-
repr(self.series)
1014+
# various names
1015+
for name in ['', 1, 1.2, 'foo', u'\u03B1\u03B2\u03B3',
1016+
'loooooooooooooooooooooooooooooooooooooooooooooooooooong',
1017+
('foo', 'bar', 'baz'),
1018+
(1, 2),
1019+
('foo', 1, 2.3),
1020+
(u'\u03B1', u'\u03B2', u'\u03B3'),
1021+
(u'\u03B1', 'bar')]:
1022+
self.series.name = name
1023+
repr(self.series)
10171024

10181025
biggie = Series(tm.randn(1000), index=np.arange(1000),
10191026
name=('foo', 'bar', 'baz'))

0 commit comments

Comments
 (0)