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

Method map

pandas/core/arrays/arrow/array.py:1762–1770  ·  view source on GitHub ↗
(self, mapper, na_action: Literal["ignore"] | None = None)

Source from the content-addressed store, hash-verified

1760 return result
1761
1762 def map(self, mapper, na_action: Literal["ignore"] | None = None):
1763 if is_numeric_dtype(self.dtype):
1764 return map_array(self.to_numpy(), mapper, na_action=na_action)
1765 else:
1766 # For "mM" cases, the super() method passes `self` without the
1767 # to_numpy call, which inside map_array casts to ndarray[object].
1768 # Without the to_numpy() call, NA is preserved instead of changed
1769 # to None.
1770 return super().map(mapper, na_action)
1771
1772 @doc(ExtensionArray.duplicated)
1773 def duplicated(

Callers

nothing calls this directly

Calls 3

to_numpyMethod · 0.95
is_numeric_dtypeFunction · 0.90
map_arrayFunction · 0.90

Tested by

no test coverage detected