无涯教程-NumPy - lower()函数

63 阅读1分钟

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

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

其输出如下-

[hello world]
hello

参考链接

www.learnfk.com/numpy/numpy…