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

Function func

pandas/tests/frame/methods/test_map.py:42–43  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

40 df = DataFrame(data={"a": arr, "b": sparse_arr})
41
42 def func(x):
43 return str.upper(x) if not pd.isna(x) else x
44
45 result = df.map(func, na_action=na_action)
46

Calls 2

upperMethod · 0.80
isnaMethod · 0.45

Tested by

no test coverage detected