MCPcopy
hub / github.com/dask/dask / test_to_numeric_on_dask_dataframe_series

Function test_to_numeric_on_dask_dataframe_series

dask/dataframe/tests/test_numeric.py:42–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41
42def test_to_numeric_on_dask_dataframe_series():
43 s = pd.Series(["1.0", "2", -3, -5.1])
44 arg = from_pandas(s, npartitions=2)
45 expected = pd.to_numeric(s)
46 output = to_numeric(arg)
47 expected_dtype = "int64"
48 if pyarrow_strings_enabled():
49 # `to_numeric` output depends on input dtype
50 expected_dtype = "Int64"
51 assert output.dtype == expected_dtype
52 assert isinstance(output, Series)
53 assert list(output.compute()) == list(expected)
54
55
56def test_to_numeric_on_dask_dataframe_series_with_meta():

Callers

nothing calls this directly

Calls 4

from_pandasFunction · 0.90
to_numericFunction · 0.90
pyarrow_strings_enabledFunction · 0.90
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…