numpy.core.defchararray.istitle(arr)
returns True for each item in the array if item is a title row and exists at least one character, otherwise it returns false.
Parameters:
arr: array_like of str or unicodeReturns: [ndarray] Output array of bools.
Code # 1:
|
Output :
input array: [’P4Q R’’ 4Q Rp’ ’Q rP4’’ Rpq’] output array: [True True False True]
Code # 2:
# Python program explaining # numpy.char.istitle () function
|
Exit:
input array: [’GEEKS’’ for’ ’Geeks’] output array: [False False True]