The swapcase() function is mainly used to return an element-wise copy of the string with the uppercase characters of the string converted to lowercase and lowercase characters converted to uppercase. In short, it swaps or changes the case of the characters in a given string. This function is locale-dependent for an 8-bitContinue Reading

The capitalize() function is basically used to convert the first character of a string to an uppercase (capital) letter. If the string is having its first character as capital already, then this function will return the original string itself. This function calls the str.capitalize in an element-wise manner. This function is locale-dependent for an 8-bit string. SyntaxContinue Reading

The upper() function is used to convert all lowercase characters of a string to uppercase. If there is no lowercase characters in the given string then this function will return the original string. Syntax of numpy.char.upper(): The syntax required to use this function is as follows: The above syntax indicates that upper() function takes two parameters.Continue Reading

The isdecimal() function returns True if there are only decimal characters in the element, otherwise, this function will return False. This function calls unicode.isdecimal for every string element of the array. It is important to note that the decimal characters include digit characters and all those characters that can be used to form decimal-radix numbers, e.g. U+0661, ARABIC-INDIC DIGIT ONE, etc.Continue Reading

The isdigit() function returns True if all the characters in the element are digits or numbers otherwise, this function returns False. Syntax of numpy.char.isdigit(): The syntax required to use this function is as follows: The above syntax indicates that isdigit() function takes a single parameter. In the above syntax, the argument arr is mainly used to indicate the input arrayContinue Reading

The isspace() function of the NumPy library returns True if all the characters in the element are whitespaces, otherwise, this function will return False. Syntax of the isspace(): The syntax required to use this function is as follows: The above syntax indicates that isspace() function takes a single parameter. In the above syntax, the argument arr is mainly used toContinue Reading

The startswith() function returns a boolean array with values that can either be True or False. This function will return True, if the given string starts with the specified prefix value in the function. Hence the function stands true to its name. This function calls str.startswith ifor all the string elements of the array, if it is used with anContinue Reading

The index() function is used to perform string search operation in a given array of strings. If we have an array of strings then this function will provide the first index of any substring to be searched, if it is present in the array elements. Syntax of index(): The syntax required to useContinue Reading

The isalpha() function returns True if all the characters in the string element are alphabets, otherwise, this function will return False. This function calls str.isalpha internally for each element of the array. This function is locale-dependent for an 8-bit string. Syntax of isalpha(): The syntax required to use this function is as follows: The above syntax indicates that isalpha() function takesContinue Reading

The isnumeric() function of the NumPy library returns True if there are only numeric characters in the string, otherwise, this function will return False. Loaded: 1.70%Fullscreen Syntax for isnumeric(): The syntax required to use this function is as follows: The above syntax indicates that isnumeric() function takes a single parameter. In the above syntax, the argument arr is mainly used toContinue Reading