此函数返回一个数组,其中元素转换为小写。它为每个元素调用 str.lower 。

import numpy as np 
print np.char.lower(['HELLO','WORLD']) 
print np.char.lower('HELLO')

其输出如下-

['hello' 'world']
hello

参考链接

https://www.learnfk.com/numpy/numpy-char-lower.html