Skip to content

Commit 2a60c15

Browse files
committed
Use repr / str
1 parent 3825aeb commit 2a60c15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/core/arrays/base.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,12 @@ def _formatter(self, boxed=False):
697697
-------
698698
Callable[[Any], str]
699699
A callable that gets instances of the scalar type and
700-
returns a string. By default, :func:`repr` is used.
700+
returns a string. By default, :func:`repr` is used
701+
when ``boxed=False`` and :func:`str` is used when
702+
``boxed=True``.
701703
"""
704+
if boxed:
705+
return str
702706
return repr
703707

704708
def _formatting_values(self):

0 commit comments

Comments
 (0)