NumPy char upper

NumPy char upper

In this chapter, we will discuss about NumPy char upper.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']

Next Topic – Click Here

This Post Has 2 Comments

Leave a Reply