1 字符串比较函数
1.1 numpy.char.equal()
Example:
print(np.char.equal('Blair','blair'))
print(np.char.equal('Blair','Blair'))
"""
False
True
"""
1.2 numpy.char.not_equal()
Example:
print(np.char.not_equal('Blair','blair'))
print(np.char.not_equal('Blair','Blair'))
"""
True
False
"""
1.3 numpy.char.greater_equal()
char.greater_equal(x1, x2)
判断 (x1 >= x2)
。
Example:
print(np.char.greater_equal('Blair','blair'))
print(np.char.greater_equal('Blair','Blair'))
print(np.char.greater_equal('abc','abd'))
print(np.char.greater_equal('abc','Abd'))
"""
False
True
False
True
"""
1.4 numpy.char.less_equal()
char.less_equal(x1, x2)
判断 (x1 <= x2)
。
Example:
print(np.char.less_equal('Blair','blair'))
print(np.char.less_equal('Blair','Blair'))
print(np.char.less_equal('abc','abd'))
print(np.char.less_equal('abc','Abd'))
"""
True
True
True
False
"""
1.5 numpy.char.less()
char.less(x1, x2)
判断 (x1 < x2)
。
Example:
print(np.char.less('Blair','blair'))
print(np.char.less('Blair','Blair'))
print(np.char.less('abc','abd'))
print(np.char.less('abc','Abd'))
"""
True
False
True
False
"""