pandas.Series.str.isupper

Check whether all characters in each string are uppercase.

This is equivalent to running the Python string method str.isupper() for each element of the Series/Index. If a string has zero characters, False is returned for that check.

return

Series or Index of bool Series or Index of boolean values with the same length as the original Series/Index.

Limitations

This function may reveal slower performance than Pandas* on user system. Users should exercise a tradeoff between staying in JIT-region with that function or going back to interpreter mode.

Examples

Check whether all characters in each string are uppercase.
import pandas as pd
from numba import njit


@njit
def series_str_isupper():
    series = pd.Series(['FOO', 'BAr', 'FooBar'])  # Series of 'FOO', 'BAr', 'FooBar'
    out_series = series.str.isupper()

    return out_series  # Expect series of True, False, False


print(series_str_isupper())
$ python ./series/str/series_str_isupper.py
0     True
1    False
2    False
dtype: bool

See also

Series.str.isalpha

Checks whether all characters are alphabetic.

Series.str.isnumeric

Checks whether all characters are numeric.

Series.str.isalnum

Checks whether all characters are alphanumeric.

Series.str.isdigit

Checks whether all characters are digits.

Series.str.isdecimal

Checks whether all characters are decimal.

Series.str.isspace

Checks whether all characters are whitespace.

Series.str.islower

Checks whether all characters are lowercase.

Series.str.isupper

Checks whether all characters are uppercase.

Series.str.istitle

Checks whether all characters are titlecase.