MCPcopy
hub / github.com/pandas-dev/pandas / test_to_numpy

Method test_to_numpy

pandas/tests/frame/methods/test_to_numpy.py:14–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12
13class TestToNumpy:
14 def test_to_numpy(self):
15 df = DataFrame({"A": [1, 2], "B": [3, 4.5]})
16 expected = np.array([[1, 3], [2, 4.5]])
17 result = df.to_numpy()
18 tm.assert_numpy_array_equal(result, expected)
19
20 def test_to_numpy_dtype(self):
21 df = DataFrame({"A": [1, 2], "B": [3, 4.5]})

Callers

nothing calls this directly

Calls 3

to_numpyMethod · 0.95
DataFrameClass · 0.90
arrayMethod · 0.45

Tested by

no test coverage detected