Skip to content

Commit 24b70be

Browse files
committed
TST: Rewrite and move new test to test_repr folder (pandas-dev#35603).
Checks if series representation matches expected String.
1 parent 75786bd commit 24b70be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/series/test_repr.py

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

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

244253
class TestCategoricalRepr:
245254
def test_categorical_repr_unicode(self):

0 commit comments

Comments
 (0)