NumPy - numpy.char.lower() 函数
-
简述
此函数返回一个数组,其中元素转换为小写。它调用str.lower对于每个元素。import numpy as np print np.char.lower(['HELLO','WORLD']) print np.char.lower('HELLO')它的输出如下 -['hello' 'world'] hello
import numpy as np
print np.char.lower(['HELLO','WORLD'])
print np.char.lower('HELLO')
['hello' 'world']
hello