cudf.core.column.string.StringMethods.is_vowel#

StringMethods.is_vowel(position) SeriesOrIndex#

Return true for strings where the character at position is a vowel – not a consonant. The position parameter may also be a list of integers to check different characters per string. If the position is larger than the string length, False is returned for that string.

Parameters:
position: int or list-like

The character position to check within each string.

Returns:
Series or Index of bool dtype.

Examples

>>> import cudf
>>> ser = cudf.Series(["toy", "trouble"])
>>> ser.str.is_vowel(1)
0     True
1    False
dtype: bool
>>> positions = cudf.Series([2, 3])
>>> ser.str.is_vowel(positions)
0    False
1     True
dtype: bool