Numpy-char-upper

提供:Dev Guides
移動先:案内検索

numpy.char.upper()

この関数は、配列の各要素に対して str.upper 関数を呼び出して、大文字の配列要素を返します。

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

ここにその出力があります-

HELLO
['HELLO' 'WORLD']