@@ -991,6 +991,84 @@ def hpat_pandas_stringmethods_istitle_impl(self):
991991 return hpat_pandas_stringmethods_istitle_impl
992992
993993
994+ @overload_method (StringMethodsType , 'isspace' )
995+ def hpat_pandas_stringmethods_isspace (self ):
996+ """
997+ Intel Scalable Dataframe Compiler User Guide
998+ ********************************************
999+ Pandas API: pandas.Series.str.isspace
1000+
1001+ Limitations
1002+ -----------
1003+ Series elements are expected to be Unicode strings. Elements cannot be NaN.
1004+
1005+ Examples
1006+ --------
1007+ .. literalinclude:: ../../../examples/series/str/series_str_isspace.py
1008+ :language: python
1009+ :lines: 27-
1010+ :caption: Check if all the characters in the text are whitespaces
1011+ :name: ex_series_str_isspace
1012+
1013+ .. command-output:: python ./series/str/series_str_isspace.py
1014+ :cwd: ../../../examples
1015+
1016+ .. seealso::
1017+ :ref:`Series.str.isalpha <pandas.Series.str.isalpha>`
1018+ Check whether all characters are alphabetic.
1019+ :ref:`Series.str.isnumeric <pandas.Series.str.isnumeric>`
1020+ Check whether all characters are numeric.
1021+ :ref:`Series.str.isalnum <pandas.Series.str.isalnum>`
1022+ Check whether all characters are alphanumeric.
1023+ :ref:`Series.str.isdigit <pandas.Series.str.isdigit>`
1024+ Check whether all characters are digits.
1025+ :ref:`Series.str.isdecimal <pandas.Series.str.isdecimal>`
1026+ Check whether all characters are decimal.
1027+ :ref:`Series.str.isspace <pandas.Series.str.isspace>`
1028+ Check whether all characters are whitespace.
1029+ :ref:`Series.str.islower <pandas.Series.str.islower>`
1030+ Check whether all characters are lowercase.
1031+ :ref:`Series.str.isupper <pandas.Series.str.isupper>`
1032+ Check whether all characters are uppercase.
1033+ :ref:`Series.str.istitle <pandas.Series.str.istitle>`
1034+ Check whether all characters are titlecase.
1035+
1036+ Intel Scalable Dataframe Compiler Developer Guide
1037+ *************************************************
1038+
1039+ Pandas Series method :meth:`pandas.core.strings.StringMethods.isspace()` implementation.
1040+
1041+ Note: Unicode type of list elements are supported only. Numpy.NaN is not supported as elements.
1042+
1043+ .. only:: developer
1044+
1045+ Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_isspace_str
1046+
1047+ Parameters
1048+ ----------
1049+ self: :class:`pandas.core.strings.StringMethods`
1050+ input arg
1051+
1052+ Returns
1053+ -------
1054+ :obj:`pandas.Series`
1055+ returns :obj:`pandas.Series` object
1056+ """
1057+
1058+ ty_checker = TypeChecker ('Method isspace().' )
1059+ ty_checker .check (self , StringMethodsType )
1060+
1061+ def hpat_pandas_stringmethods_isspace_impl (self ):
1062+ item_count = len (self ._data )
1063+ result = numpy .empty (item_count , numba .types .boolean )
1064+ for idx , item in enumerate (self ._data ._data ):
1065+ result [idx ] = item .isspace ()
1066+
1067+ return pandas .Series (result , self ._data ._index , name = self ._data ._name )
1068+
1069+ return hpat_pandas_stringmethods_isspace_impl
1070+
1071+
9941072# _hpat_pandas_stringmethods_autogen_methods = sorted(dir(numba.types.misc.UnicodeType.__getattribute__.__qualname__))
9951073_hpat_pandas_stringmethods_autogen_methods = ['upper' , 'lower' , 'lstrip' , 'rstrip' , 'strip' ]
9961074"""
0 commit comments