numpy.char.lower()
将字符串中的每个字母转换为小写。即对每个元素调用str.lower。
例程
import numpy as np
print('将字符串中的每个字母转换为小写')
print(np.char.lower('HELLO WORLD! hello world!'))
print(np.char.lower(['HELLO WORLD!','hello world!']))
运行结果
将字符串中的每个字母转换为小写
hello world! hello world!
['hello world!' 'hello world!']