该numpy.char
模块为类型numpy.string_
或的数组提供了一组向量化的字符串操作numpy.unicode_
。它们全部基于Python标准库中的字符串方法。
|
返回两个str或unicode数组的按元素的字符串连接。 |
|
返回(a * i),即按元素方式的字符串多重连接。 |
|
返回(a%i),这是Python 2.6之前的字符串格式(迭代),针对一对str或unicode的array_likes元素。 |
|
返回的拷贝一个只有资本的每个元素的第一个字符。 |
|
返回的拷贝一与在长度的字符串居中其元素宽度。 |
|
按元素调用str.decode。 |
|
逐元素调用str.encode。 |
|
返回每个字符串元素的副本,其中所有制表符都被一个或多个空格替换。 |
|
返回一个字符串,该字符串是序列seq中字符串的串联。 |
|
返回与元素的数组一个左对齐的长度的字符串宽度。 |
|
返回一个将元素转换为小写的数组。 |
|
对于每一个元素一个,去除了主角返回副本。 |
|
将每个元素划分为大约sep。 |
|
对于每一个元素一个,返回字符串的副本串中出现的所有旧的换成新的。 |
|
返回与元素的数组一个右对齐的长度的字符串宽度。 |
|
在最右边的分隔符周围分割(分割)每个元素。 |
|
在每个元件一个,返回的词的列表字符串中,使用月作为分隔符串。 |
|
在每个元件一个,返回与除去尾部字符的副本。 |
|
在每个元件一个,返回的词的列表字符串中,使用月作为分隔符串。 |
|
在每个元件一个,返回行的列表中的元素,在断裂线边界。 |
|
在每个元件一个,返回与该前缘和后字符的副本中删除。 |
|
按元素返回字符串的副本,该字符串的大写字符转换为小写,反之亦然。 |
|
返回字符串或unicode的逐元素标题区分大小写的版本。 |
|
对于每一个元素一个,返回其中可选的参数中出现的所有字符的字符串拷贝deletechars被删除,而剩余的字符已经通过给定的转换表映射。 |
|
返回一个数组,其中元素转换为大写。 |
|
返回用零填充的数字字符串 |
Unlike the standard numpy comparison operators, the ones in the char module strip trailing whitespace characters before performing the comparison.
|
Return (x1 == x2) element-wise. |
|
Return (x1 != x2) element-wise. |
|
Return (x1 >= x2) element-wise. |
|
Return (x1 <= x2) element-wise. |
|
Return (x1 > x2) element-wise. |
|
Return (x1 < x2) element-wise. |
|
Performs element-wise comparison of two string arrays using the comparison operator specified by cmp_op. |
|
Returns an array with the number of non-overlapping occurrences of substring sub in the range [start, end]. |
|
Returns a boolean array which is True where the string element in a ends with suffix, otherwise False. |
|
For each element, return the lowest index in the string where substring sub is found. |
|
Like |
|
Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise. |
|
Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise. |
|
For each element, return True if there are only decimal characters in the element. |
|
Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise. |
|
Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise. |
|
For each element, return True if there are only numeric characters in the element. |
|
Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise. |
|
Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise. |
|
Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise. |
|
For each element in a, return the highest index in the string where substring sub is found, such that sub is contained within [start, end]. |
|
Like |
|
Returns a boolean array which is True where the string element in a starts with prefix, otherwise False. |
|
Return len(a) element-wise. |