(self, pat, na=None)
return hpat_pandas_stringmethods_startswith_impl
Intel Scalable Dataframe Compiler User Guide
    ********************************************
    Pandas API: pandas.Series.str.startswith

    Limitations
    -----------
    Series elements are expected to be Unicode strings. Elements cannot be `NaNs`.
    Parameter ``na`` is supported only with default value ``None``.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/str/series_str_startswith.py
       :language: python
       :lines: 27-
       :caption: Test if the start of each string element matches a string
       :name: ex_series_str_startswith

    .. command-output:: python ./series/str/series_str_startswith.py
       :cwd: ../../../examples

    .. seealso::
        `str.startswith <https://docs.python.org/3/library/stdtypes.html#str.startswith>`_
            Python standard library string method.
        :ref:`Series.str.endswith <pandas.Series.str.endswith>`
            Same as startswith, but tests the end of string.
        :ref:`Series.str.contains <pandas.Series.str.contains>`
            Tests if string element contains a pattern.

    .. todo::
        - Add support of matching the start of each string by a pattern
        - Add support of parameter ``na``

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************

    Pandas Series method :meth:`pandas.core.strings.StringMethods.startswith()` implementation.

    .. only:: developer

    Test: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_startswith
Intel Scalable Dataframe Compiler User Guide
    ********************************************
    Pandas API: pandas.Series.str.startswith
Intel Scalable Dataframe Compiler User Guide ******************************************** Pandas API : pandas . Series . str . startswith
def hpat_pandas_stringmethods_startswith(self, pat, na=None):
    """
    Intel Scalable Dataframe Compiler User Guide
    ********************************************
    Pandas API: pandas.Series.str.startswith

    Limitations
    -----------
    Series elements are expected to be Unicode strings. Elements cannot be `NaNs`.
    Parameter ``na`` is supported only with default value ``None``.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/str/series_str_startswith.py
       :language: python
       :lines: 27-
       :caption: Test if the start of each string element matches a string
       :name: ex_series_str_startswith

    .. command-output:: python ./series/str/series_str_startswith.py
       :cwd: ../../../examples

    .. seealso::
        `str.startswith <https://docs.python.org/3/library/stdtypes.html#str.startswith>`_
            Python standard library string method.
        :ref:`Series.str.endswith <pandas.Series.str.endswith>`
            Same as startswith, but tests the end of string.
        :ref:`Series.str.contains <pandas.Series.str.contains>`
            Tests if string element contains a pattern.

    .. todo::
        - Add support of matching the start of each string by a pattern
        - Add support of parameter ``na``

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************

    Pandas Series method :meth:`pandas.core.strings.StringMethods.startswith()` implementation.

    .. only:: developer

    Test: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_startswith
    """

    ty_checker = TypeChecker('Method startswith().')
    ty_checker.check(self, StringMethodsType)

    if not isinstance(pat, (StringLiteral, UnicodeType)):
        ty_checker.raise_exc(pat, 'str', 'pat')

    if not isinstance(na, (Boolean, NoneType, Omitted)) and na is not None:
        ty_checker.raise_exc(na, 'bool', 'na')

    def hpat_pandas_stringmethods_startswith_impl(self, pat, na=None):
        if na is not None:
            msg = 'Method startswith(). The object na\n expected: None'
            raise ValueError(msg)

        item_startswith = len(self._data)
        result = numpy.empty(item_startswith, numba.types.boolean)
        for idx, item in enumerate(self._data._data):
            result[idx] = item.startswith(pat)

        return pandas.Series(result, self._data._index, name=self._data._name)

    return hpat_pandas_stringmethods_startswith_impl
def hpat_pandas_stringmethods_startswith ( self , pat , na = None ) : ty_checker = TypeChecker ( 'Method startswith().' ) ty_checker . check ( self , StringMethodsType ) if not isinstance ( pat , ( StringLiteral , UnicodeType ) ) : ty_checker . raise_exc ( pat , 'str' , 'pat' ) if not isinstance ( na , ( Boolean , NoneType , Omitted ) ) and na is not None : ty_checker . raise_exc ( na , 'bool' , 'na' ) def hpat_pandas_stringmethods_startswith_impl ( self , pat , na = None ) : if na is not None : msg = 'Method startswith(). The object na\n expected: None' raise ValueError ( msg ) item_startswith = len ( self . _data ) result = numpy . empty ( item_startswith , numba . types . boolean ) for idx , item in enumerate ( self . _data . _data ) : result [ idx ] = item . startswith ( pat ) return pandas . Series ( result , self . _data . _index , name = self . _data . _name ) return hpat_pandas_stringmethods_startswith_impl