NumPy 字符串函数 numpy.char.title() 该函数返回输入字符串的标题格式版本,每个单词的第一个字母都是大写的。 import numpy as np print np.char.title('hello how are you?') PythonCopy 它的输出将是以下内容: Hello How Are You?PythonCopy