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

Function test_map_str

pandas/tests/frame/methods/test_map.py:58–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def test_map_str():
59 # GH 2786
60 df = DataFrame(np.random.default_rng(2).random((3, 4)))
61 df2 = df.copy()
62 cols = ["a", "a", "a", "a"]
63 df.columns = cols
64
65 expected = df2.map(str)
66 expected.columns = cols
67 result = df.map(str)
68 tm.assert_frame_equal(result, expected)
69
70
71@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

mapMethod · 0.95
DataFrameClass · 0.90
copyMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected