Skip to content

Commit 1a20d13

Browse files
authored
TST: Check float format in object column (#35603) (#41668)
1 parent 91bd03b commit 1a20d13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/series/test_repr.py

+7
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@ def test_series_repr_nat(self):
240240
)
241241
assert result == expected
242242

243+
def test_float_repr(self):
244+
# GH#35603
245+
# check float format when cast to object
246+
ser = Series([1.0]).astype(object)
247+
expected = "0 1.0\ndtype: object"
248+
assert repr(ser) == expected
249+
243250

244251
class TestCategoricalRepr:
245252
def test_categorical_repr_unicode(self):

0 commit comments

Comments
 (0)