In this chapter, we will discuss about NumPy char split. This function returns a list of words in the input string. By default, a whitespace is used as a separator. Otherwise the specified separator character is used to spilt the string.
import numpy as np print np.char.split ('hello how are you?') print np.char.split ('TutorialsPoint,Hyderabad,Telangana', sep = ',')
Its output would be −
['hello', 'how', 'are', 'you?'] ['TutorialsPoint', 'Hyderabad', 'Telangana']
Next Topic – Click Here
Pingback: NumPy char upper - Adglob Infosystem Pvt Ltd ......
Pingback: NumPy String Functions - Adglob Infosystem Pvt Ltd