In this chapter, we will discuss about NumPy char strip. This function returns a copy of array with elements stripped of the specified characters leading and/or trailing in it.
import numpy as np print np.char.strip('ashok arora','a') print np.char.strip(['arora','admin','java'],'a')
Here is its output −
shok aror ['ror' 'dmin' 'jav']
Next Topic – Click Here
Pingback: NumPy char splitlines - Adglob Infosystem Pvt Ltd ...
Pingback: NumPy String Functions - Adglob Infosystem Pvt Ltd