numpy string operations | title() function Last Updated : 14 Jan, 2019 Comments Improve Suggest changes Like Article Like Report numpy.core.defchararray.title(arr): function is used to Return element-wise title cased version of string or unicode.Title case words start with uppercase characters, all remaining cased characters are lowercase. Parameters: arr : [ array_like ] Input array which may be str or unicode. Returns : [ndarray] Output array of str or unicode, depending on input type. Code #1: Python3 # Python Program explaining # numpy.char.title() function import numpy as geek in_arr = geek.array(['p4q r', '4q rp', 'q rp4', 'rp4q']) print ("input array : ", in_arr) out_arr = geek.char.title(in_arr) print ("output titled array :", out_arr) Output: input array : ['p4q r' '4q rp' 'q rp4' 'rp4q'] output titled array : ['P4Q R' '4Q Rp' 'Q Rp4' 'Rp4Q'] Code #2: Python3 # Python Program explaining # numpy.char.title() function import numpy as geek in_arr = geek.array(['geeks', 'for', 'geeks']) print ("input array : ", in_arr) out_arr = geek.char.title(in_arr) print ("output titled array :", out_arr ) Output: input array : ['geeks' 'for' 'geeks'] output titled array : ['Geeks' 'For' 'Geeks'] Comment More infoAdvertise with us Next Article numpy string operations | title() function jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-String Operation Practice Tags : python Similar Reads Numpy - String Functions & Operations NumPy String functions belong to the numpy.char module and are designed to perform element-wise operations on arrays. These functions can help to handle and manipulate string data efficiently.Table of ContentString OperationsString Information String Comparison In this article, weâll explore the var 5 min read numpy string operations | upper() function numpy.core.defchararray.upper(arr): function is used to return an array with the elements converted to uppercase. Parameters: arr : [ array_like ] Input array which may be str or unicode. Returns : [ndarray] Output uppercased array of str or unicode, depending on input type. Code #1: Python3 # Pytho 1 min read numpy string operations | split() function numpy.core.defchararray.split(arr, sep=None, maxsplit=None) is another function for doing string operations in numpy.It returns a list of the words in the string, using sep as the delimiter string for each element in arr. Parameters: arr : array_like of str or unicode.Input array. sep : [ str or uni 2 min read Numpy string operations | rindex() function numpy.core.defchararray.rindex() function, raises ValueError when the substring sub is not found. Calls str.rindex element-wise. Syntax : numpy.core.defchararray.rindex(arr, sub, start = 0, end = None) Parameters : arr : [array-like of str or unicode] Array-like of str . sub : [str or unicode] Input 1 min read numpy string operations | istitle() function numpy.core.defchararray.istitle(arr) function returns True for each element in the array if the element is a titlecased string and there is at least one character, it returns false otherwise. Parameters: arr : array_like of str or unicode Returns : [ndarray] Output array of bools. Code #1: Python3 # 1 min read Numpy string operations | replace() function In the numpy.core.defchararray.replace() function, each element in arr, return a copy of the string with all occurrences of substring old replaced by new. Syntax : numpy.core.defchararray.replace(arr, old, new, count = None) Parameters : arr : [array-like of str] Given array-like of string. old : [s 1 min read Numpy string operations | startswith() function numpy.core.defchararray.startswith() function returns a boolean array which is True where the string element in starts with prefix, otherwise False. Syntax : numpy.core.defchararray.startswith(arr, prefix, start = 0, end = None) Parameters : arr : [array-like of str or unicode] Array-like of str. pr 1 min read Numpy string operations | partition() function In the numpy.core.defchararray.partition() function, each element in arr, split the element as the first occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 strings containin 1 min read Numpy string operations | rpartition() function In the numpy.core.defchararray.rpartition() function, each element in arr, split the element as the last occurrence of sep, and return 3 strings containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 strings containin 1 min read turtle.title() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.title() This function is used to set the title of turtle-window. It requires 1 min read Like