Pandas Series: str.isupper() function
Series-str.isupper() function
The str.isupper() function is used to check whether all characters in each string are uppercase or not.
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.
Syntax:
Series.str.isupper(self)
Returns: Series or Index of bool
Series or Index of boolean values with the same length as the original Series/Index.
Example:
Python-Pandas Code:
import numpy as np
import pandas as pd
s = pd.Series(['tiger', 'Lion', 'SNAKE', ''])
s.str.isupper()
Output:
0 False 1 False 2 True 3 False dtype: bool
Previous: Series-str.islower() function
Next: Series-str.istitle() function
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/pandas/series/series-str-isupper.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics