Skip to content

Commit 46ef8a6

Browse files
author
y-p
committed
BUG: MultiIndex repr should properly encode unicode labels
1 parent 209fb0b commit 46ef8a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/core/index.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,11 +1321,15 @@ def __repr__(self):
13211321
self[-50:].values])
13221322
else:
13231323
values = self.values
1324-
summary = np.array2string(values, max_line_width=70)
1324+
1325+
summary = com.pprint_thing(values)
13251326

13261327
np.set_printoptions(threshold=options['threshold'])
13271328

1328-
return output % summary
1329+
if py3compat.PY3:
1330+
return output % summary
1331+
else:
1332+
return com.console_encode(output % summary)
13291333

13301334
def __len__(self):
13311335
return len(self.labels[0])

0 commit comments

Comments
 (0)