numpy.char.upper()


Advertisements

This function calls str.upper function on each element in an array to return the uppercase array elements.

import numpy as np 
print np.char.upper('hello') 
print np.char.upper(['hello','world'])

Here is its output −

HELLO
['HELLO' 'WORLD']
numpy_string_functions.htm
Advertisements