Skip to content

Commit 384eedd

Browse files
fix display in series
1 parent b966986 commit 384eedd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pandas/io/formats/format.py

-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
ExtensionArray,
6868
TimedeltaArray,
6969
)
70-
from pandas.core.arrays.string_ import StringDtype
7170
from pandas.core.base import PandasObject
7271
import pandas.core.common as com
7372
from pandas.core.indexes.api import (
@@ -1218,8 +1217,6 @@ def _format(x):
12181217
return self.na_rep
12191218
elif isinstance(x, PandasObject):
12201219
return str(x)
1221-
elif isinstance(x, StringDtype):
1222-
return repr(x)
12231220
else:
12241221
# object dtype
12251222
return str(formatter(x))

pandas/tests/io/formats/test_to_string.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -777,9 +777,9 @@ def test_to_string_string_dtype(self):
777777
result = df.dtypes.to_string()
778778
expected = dedent(
779779
"""\
780-
x string[pyarrow]
781-
y string[python]
782-
z int64[pyarrow]"""
780+
x string
781+
y string
782+
z int64[pyarrow]"""
783783
)
784784
assert result == expected
785785

0 commit comments

Comments
 (0)