numpy.core.defchararray.lower(arr)
is used to return an array with elements converted to lowercase.
Parameters:
arr: [array_like] Input array which may be str or unicode.Returns: [ ndarray] Output lowercased array of str or unicode, depending on input type.
Code # 1:
|
Output:
input array: [’P4Q R’’ 4Q RP’’ Q RP4’’ RP4Q’] output lowercased array: [’p4q r’’ 4q rp’’ q rp4’’ rp4q’]
Code # 2:
|
Exit:
input array: [’GEEKS’’ FOR’ ’GEEKS’] output lowercased array: [’ geeks’ ’for’’ geeks’]