Skip to content

Commit 4aa6c06

Browse files
TST: Wrote test for Float64 conversion #40729 (#48205)
* TST: Wrote test for Float64 conversion #40729 * TST: Moved test #40729 Co-authored-by: Steven Rotondo <[email protected]>
1 parent 1e48b86 commit 4aa6c06

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/arrays/floating/test_astype.py

+10
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,13 @@ def test_astype_object(dtype):
116116
# check exact element types
117117
assert isinstance(result[0], float)
118118
assert result[1] is pd.NA
119+
120+
121+
def test_Float64_conversion():
122+
# GH#40729
123+
testseries = pd.Series(["1", "2", "3", "4"], dtype="object")
124+
result = testseries.astype(pd.Float64Dtype())
125+
126+
expected = pd.Series([1.0, 2.0, 3.0, 4.0], dtype=pd.Float64Dtype())
127+
128+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)