chevron_left
Char
Method addMethod capitalizeMethod centerMethod countMethod endswithMethod equalMethod expandtabsMethod findMethod greaterMethod greater_equalMethod indexMethod isalnumMethod isalphaMethod isdecimalMethod isdigitMethod isnumericMethod isupperMethod joinMethod lessMethod less_equalMethod ljustMethod lowerMethod multiplyMethod not_equalMethod rfindMethod rjustMethod rstripMethod splitMethod splitlinesMethod startswithMethod upperMethod zfill
0
0
0
new
NumPy | isalnum method
Programming
chevron_rightPython
chevron_rightNumPy
chevron_rightDocumentation
chevron_rightChar
schedule Mar 9, 2022
Last updated Python●NumPy
Tags tocTable of Contents
expand_more Numpy's isalnum(~)
method checks whether each string of the input array is alphanumeric. Note that this extends to other languages as well.
Parameters
1. a
| array-like
The input array.
Return value
If a
is a scalar, then a single boolean is returned. Otherwise, a Numpy array of booleans is returned.
Examples
np.char.isalnum(["aNz", "", "2f", "*e", "私"])
array([ True, False, True, False, True])
Notice how 私, which is Chinese/Japanese, returned true.
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...