(self, level=None)
return hpat_pandas_series_count_impl
Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.count

    Limitations
    -----------
    Parameter ``level`` is currently unsupported.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_count.py
       :language: python
       :lines: 27-
       :caption: Counting non-NaN values in Series
       :name: ex_series_count

    .. command-output:: python ./series/series_count.py
       :cwd: ../../../examples

    .. seealso::

        :ref:`Series.value_counts <pandas.Series.value_counts>`
            Return a Series containing counts of unique values.

        :ref:`Series.str.len <pandas.Series.str.len>`
            Count the length of each element in the Series.

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Pandas Series method :meth:`pandas.Series.count` implementation.

    .. only:: developer
        Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_count
Intel Scalable Dataframe Compiler User Guide
    ********************************************
Intel Scalable Dataframe Compiler User Guide ********************************************
def hpat_pandas_series_count(self, level=None):
    """
    Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.count

    Limitations
    -----------
    Parameter ``level`` is currently unsupported.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_count.py
       :language: python
       :lines: 27-
       :caption: Counting non-NaN values in Series
       :name: ex_series_count

    .. command-output:: python ./series/series_count.py
       :cwd: ../../../examples

    .. seealso::

        :ref:`Series.value_counts <pandas.Series.value_counts>`
            Return a Series containing counts of unique values.

        :ref:`Series.str.len <pandas.Series.str.len>`
            Count the length of each element in the Series.

    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Pandas Series method :meth:`pandas.Series.count` implementation.

    .. only:: developer
        Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_count
    """

    _func_name = 'Method count().'
    ty_checker = TypeChecker(_func_name)
    ty_checker.check(self, SeriesType)

    if not isinstance(level, (types.Omitted, types.NoneType)) and level is not None:
        ty_checker.raise_exc(level, 'None', 'level')

    if isinstance(self.data, StringArrayType):
        def hpat_pandas_series_count_str_impl(self, level=None):

            nan_mask = self.isna()
            return numpy.sum(nan_mask._data == 0)

        return hpat_pandas_series_count_str_impl

    if isinstance(self.data, types.Array) and isinstance(self.data.dtype, types.Integer):
        def hpat_pandas_series_count_int_impl(self, level=None):
            return len(self._data)
        return hpat_pandas_series_count_int_impl

    def hpat_pandas_series_count_impl(self, level=None):
        """
        Return number of non-NA/null observations in the object
        Returns number of unique elements in the object
        Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_count
        """
        result = 0
        for i in prange(len(self._data)):
            if not numpy.isnan(self._data[i]):
                result = result + 1
        return result

    return hpat_pandas_series_count_impl
def hpat_pandas_series_count ( self , level = None ) : _func_name = 'Method count().' ty_checker = TypeChecker ( _func_name ) ty_checker . check ( self , SeriesType ) if not isinstance ( level , ( types . Omitted , types . NoneType ) ) and level is not None : ty_checker . raise_exc ( level , 'None' , 'level' ) if isinstance ( self . data , StringArrayType ) : def hpat_pandas_series_count_str_impl ( self , level = None ) : nan_mask = self . isna ( ) return numpy . sum ( nan_mask . _data == 0 ) return hpat_pandas_series_count_str_impl if isinstance ( self . data , types . Array ) and isinstance ( self . data . dtype , types . Integer ) : def hpat_pandas_series_count_int_impl ( self , level = None ) : return len ( self . _data ) return hpat_pandas_series_count_int_impl def hpat_pandas_series_count_impl ( self , level = None ) : """
        Return number of non-NA/null observations in the object
        Returns number of unique elements in the object
        Test: python -m sdc.runtests sdc.tests.test_series.TestSeries.test_series_count
        """ result = 0 for i in prange ( len ( self . _data ) ) : if not numpy . isnan ( self . _data [ i ] ) : result = result + 1 return result return hpat_pandas_series_count_impl