The isupper() function returns True for each string element of the ndarray, if all the characters of the string element are in uppercase. Otherwise, this function will return False. For empty strings and for special characters too, it will return False. This function calls str.isupper internally for each element of the array. This function is locale-dependent for an 8-bitContinue Reading

The lower() function is used to convert all uppercase characters into lowercase characters. If there is no uppercase characters in a given string then this method will return the original string itself. This function calls str.lower internally for every element of any given array. This function is locale-dependent for an 8-bit string. Syntax of numpy.char.lower(): The syntaxContinue Reading

The title() function is used to convert an input string into a title cased version. Syntax of numpy.char.title(): The syntax required to use this function is as follows: The above syntax indicates that title() function takes two parameters. In the above syntax, the argument arr indicates the input array of strings on which this method will be applied.Continue Reading

The split() function is used to return a list of strings after breaking the input string by the specified separator(sep). This function usually calls str.split internally on every element of the array. Syntax of numpy.char.split(): The syntax required to use this function is as follows: The above syntax indicates that split() function takes two parameters. Parameters: LetContinue Reading

The join() function is used to add a separator character or string to any given string or to all the elements of the given array of strings. Let’s take a simple example, if you have a string “STUDY” and you want to use “–” as separator character, then using the join() function the output will beContinue Reading

The center() function is used to return a copy of the input array of the required width so that the input array of a string is centered and padded on the left and right with fillchar. Syntax of numpy.char.center(): The syntax required to use this function is as follows: The above syntax indicates that center() function takes twoContinue Reading

The multiply() function is used for repeating the string elements of an ndarray, n number of time, where n can be any integer value. For example, if we have an array with one string element “study“, using multiply() function, we can change this string to “studystudy” if we choose the multiplication factor to be 2, and to “studystudystudy” ifContinue Reading

The add() function basically returns element-wise string concatenation for two arrays. Note: If you want to concatenate two arrays then both arrays needs to be of the same shape. Syntax of add(): The syntax required to use this function is as follows: m1 The above syntax indicates that add() function takes two parameters. Parameters: Let us now takeContinue Reading

For each element in an array the splitlines() function is used to return a list of the lines in the element, breaking at line boundaries. This function calls the str.splitlines for every element in the given array. Syntax of splitlines(): The syntax required to use this function is as follows: The above syntax indicates that splitlines() functionContinue Reading

The replace() function is used to return a copy of the array of strings or the string, with all occurrences of the old substring replaced by the new substring. This function is very useful if you want to do some changes in the array elements, where you want to replace a substring withContinue Reading