Back to Numerical Arrays (NumPy)
np.strReplace
Return element-wise copy with occurrences of old replaced by new.
Syntax
np.strReplace(a, old, new_, count?)
Description
Return element-wise copy with occurrences of old replaced by new.
Parameters
| Name | Description |
|---|---|
| a | - Input string array |
| old | - Substring to replace |
| new_ | - Replacement string |
| count(optional) | - Maximum replacements per element (-1 for all) |
Returns
NDArray