Skip to content

Commit 6677d39

Browse files
author
y-p
committed
CLN: Expunge stringify_seq() in favor of pprint_thing() in Index.format()
1 parent d115c86 commit 6677d39

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

pandas/core/common.py

-5
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,6 @@ def _stringify(col, encoding='UTF8'):
733733
pass
734734
return console_encode(col)
735735

736-
def _stringify_seq(values):
737-
if any(isinstance(x, unicode) for x in values):
738-
return [_stringify(x) for x in values]
739-
return [str(x) for x in values]
740-
741736
def _maybe_make_list(obj):
742737
if obj is not None and not isinstance(obj, (tuple, list)):
743738
return [obj]

pandas/core/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def format(self, name=False):
400400
values = lib.maybe_convert_objects(values, safe=1)
401401

402402
if values.dtype == np.object_:
403-
result = com._stringify_seq(values)
403+
result = [com.pprint_thing(x) for x in values]
404404
else:
405405
result = _trim_front(format_array(values, None, justify='left'))
406406
return header + result

0 commit comments

Comments
 (0)