此函数返回一个数组,其中元素转换为小写。它为每个元素调用 str.lower 。
import numpy as np print np.char.lower(['HELLO','WORLD']) print np.char.lower('HELLO')
其输出如下-
链接:https://www.learnfk.comhttps://www.learnfk.com/numpy/numpy-char-lower.html
来源:LearnFk无涯教程网
['hello' 'world'] hello
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)