@@ -1225,6 +1225,84 @@ def hpat_pandas_stringmethods_islower_impl(self):
12251225 return hpat_pandas_stringmethods_islower_impl
12261226
12271227
1228+ @overload_method (StringMethodsType , 'isalnum' )
1229+ def hpat_pandas_stringmethods_isalnum (self ):
1230+ """
1231+ Intel Scalable Dataframe Compiler User Guide
1232+ ********************************************
1233+ Pandas API: pandas.Series.str.isalnum
1234+
1235+ Limitations
1236+ -----------
1237+ Series elements are expected to be Unicode strings. Elements cannot be NaN.
1238+
1239+ Examples
1240+ --------
1241+ .. literalinclude:: ../../../examples/series/str/series_str_isalnum.py
1242+ :language: python
1243+ :lines: 27-
1244+ :caption: Check if all the characters in the text are alphanumeric
1245+ :name: ex_series_str_isalnum
1246+
1247+ .. command-output:: python ./series/str/series_str_isalnum.py
1248+ :cwd: ../../../examples
1249+
1250+ .. seealso::
1251+ :ref:`Series.str.isalpha <pandas.Series.str.isalpha>`
1252+ Check whether all characters are alphabetic.
1253+ :ref:`Series.str.isnumeric <pandas.Series.str.isnumeric>`
1254+ Check whether all characters are numeric.
1255+ :ref:`Series.str.isalnum <pandas.Series.str.isalnum>`
1256+ Check whether all characters are alphanumeric.
1257+ :ref:`Series.str.isdigit <pandas.Series.str.isdigit>`
1258+ Check whether all characters are digits.
1259+ :ref:`Series.str.isdecimal <pandas.Series.str.isdecimal>`
1260+ Check whether all characters are decimal.
1261+ :ref:`Series.str.isspace <pandas.Series.str.isspace>`
1262+ Check whether all characters are whitespace.
1263+ :ref:`Series.str.islower <pandas.Series.str.islower>`
1264+ Check whether all characters are lowercase.
1265+ :ref:`Series.str.isupper <pandas.Series.str.isupper>`
1266+ Check whether all characters are uppercase.
1267+ :ref:`Series.str.istitle <pandas.Series.str.istitle>`
1268+ Check whether all characters are titlecase.
1269+
1270+ Intel Scalable Dataframe Compiler Developer Guide
1271+ *************************************************
1272+
1273+ Pandas Series method :meth:`pandas.core.strings.StringMethods.isalnum()` implementation.
1274+
1275+ Note: Unicode type of list elements are supported only. Numpy.NaN is not supported as elements.
1276+
1277+ .. only:: developer
1278+
1279+ Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_isalnum_str
1280+
1281+ Parameters
1282+ ----------
1283+ self: :class:`pandas.core.strings.StringMethods`
1284+ input arg
1285+
1286+ Returns
1287+ -------
1288+ :obj:`pandas.Series`
1289+ returns :obj:`pandas.Series` object
1290+ """
1291+
1292+ ty_checker = TypeChecker ('Method isalnum().' )
1293+ ty_checker .check (self , StringMethodsType )
1294+
1295+ def hpat_pandas_stringmethods_isalnum_impl (self ):
1296+ item_count = len (self ._data )
1297+ result = numpy .empty (item_count , numba .types .boolean )
1298+ for idx , item in enumerate (self ._data ._data ):
1299+ result [idx ] = item .isalnum ()
1300+
1301+ return pandas .Series (result , self ._data ._index , name = self ._data ._name )
1302+
1303+ return hpat_pandas_stringmethods_isalnum_impl
1304+
1305+
12281306# _hpat_pandas_stringmethods_autogen_methods = sorted(dir(numba.types.misc.UnicodeType.__getattribute__.__qualname__))
12291307_hpat_pandas_stringmethods_autogen_methods = ['upper' , 'lower' , 'lstrip' , 'rstrip' , 'strip' ]
12301308"""
0 commit comments