Skip to content

Commit 007622d

Browse files
author
y-p
committed
ENH: Series tidy_repr should use pprint_thing and console_encode #2225
1 parent ac0898f commit 007622d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/core/series.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,11 @@ def _tidy_repr(self, max_vals=20):
884884
length=False,
885885
name=False)
886886
result = head + '\n...\n' + tail
887-
return '%s\n%s' % (result, self._repr_footer())
887+
result = '%s\n%s' % (result, self._repr_footer())
888+
889+
if py3compat.PY3:
890+
return unicode(result)
891+
return com.console_encode(result)
888892

889893
def _repr_footer(self):
890894
namestr = "Name: %s, " % com.pprint_thing(self.name) if self.name is not None else ""

0 commit comments

Comments
 (0)