Skip to content

Commit b482fd5

Browse files
author
y-p
committed
BUG: pandas-dev#1982 fix index.summary() to handle unicode in indices
internal representations should be unicode objects, not strings, conversion should be at I/O contact-points only. Note: this still does not address the problem of pprinting indices that have a tuple of unicode strings, as a value. This issue came up before, monkey-patched in f4e3ab6, but second time around - a more general solution is needed.
1 parent ee6c5ae commit b482fd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _has_complex_internals(self):
196196

197197
def summary(self, name=None):
198198
if len(self) > 0:
199-
index_summary = ', %s to %s' % (str(self[0]), str(self[-1]))
199+
index_summary = ', %s to %s' % (unicode(self[0]), unicode(self[-1]))
200200
else:
201201
index_summary = ''
202202

0 commit comments

Comments
 (0)