Check whether all characters in each string are whitespace. This is equivalent to running the Python string method :meth:`str.isspace` for each element of the Series/Index. If a string has zero characters, ``False`` is returned for that check. Returns
(self)
| 4424 | |
| 4425 | @forbid_nonstring_types(["bytes"]) |
| 4426 | def isspace(self): |
| 4427 | """ |
| 4428 | Check whether all characters in each string are whitespace. |
| 4429 | |
| 4430 | This is equivalent to running the Python string method |
| 4431 | :meth:`str.isspace` for each element of the Series/Index. If a string |
| 4432 | has zero characters, ``False`` is returned for that check. |
| 4433 | |
| 4434 | Returns |
| 4435 | ------- |
| 4436 | Series or Index of bool |
| 4437 | Series or Index of boolean values with the same length as the original |
| 4438 | Series/Index. |
| 4439 | |
| 4440 | See Also |
| 4441 | -------- |
| 4442 | Series.str.isalpha : Check whether all characters are alphabetic. |
| 4443 | Series.str.isnumeric : Check whether all characters are numeric. |
| 4444 | Series.str.isalnum : Check whether all characters are alphanumeric. |
| 4445 | Series.str.isdigit : Check whether all characters are digits. |
| 4446 | Series.str.isdecimal : Check whether all characters are decimal. |
| 4447 | Series.str.islower : Check whether all characters are lowercase. |
| 4448 | Series.str.isascii : Check whether all characters are ascii. |
| 4449 | Series.str.isupper : Check whether all characters are uppercase. |
| 4450 | Series.str.istitle : Check whether all characters are titlecase. |
| 4451 | |
| 4452 | Examples |
| 4453 | -------- |
| 4454 | |
| 4455 | >>> s4 = pd.Series([" ", "\\t\\r\\n ", ""]) |
| 4456 | >>> s4.str.isspace() |
| 4457 | 0 True |
| 4458 | 1 True |
| 4459 | 2 False |
| 4460 | dtype: bool |
| 4461 | """ |
| 4462 | result = self._data.array._str_isspace() |
| 4463 | return self._wrap_result(result, returns_string=False) |
| 4464 | |
| 4465 | @forbid_nonstring_types(["bytes"]) |
| 4466 | def islower(self): |