(self, percentiles=None, include=None, exclude=None)
return None
Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.describe

    Limitations
    -----------
    - Parameters ``include`` and ``exclude`` are currently unsupported by Intel Scalable Dataframe Compiler.
    - For string Series resulting values are returned as strings.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_describe.py
       :language: python
       :lines: 39-
       :caption: Generate descriptive statistics.
       :name: ex_series_describe

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

    .. seealso::

        :ref:`DataFrame.count <pandas.DataFrame.count>`
            Count number of non-NA/null observations.

        :ref:`DataFrame.max <pandas.DataFrame.max>`
            Maximum of the values in the object.

        :ref:`DataFrame.min <pandas.DataFrame.min>`
            Minimum of the values in the object.

        :ref:`DataFrame.mean <pandas.DataFrame.mean>`
            Mean of the values.

        :ref:`DataFrame.std <pandas.DataFrame.std>`
            Standard deviation of the observations.

        :ref:`DataFrame.select_dtypes <pandas.DataFrame.select_dtypes>`
            Subset of a DataFrame including/excluding columns based on their dtype.

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

    .. only:: developer

       Tests: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_describe*
Intel Scalable Dataframe Compiler User Guide
    ********************************************
Intel Scalable Dataframe Compiler User Guide ********************************************
def hpat_pandas_series_describe(self, percentiles=None, include=None, exclude=None):
    """
    Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.describe

    Limitations
    -----------
    - Parameters ``include`` and ``exclude`` are currently unsupported by Intel Scalable Dataframe Compiler.
    - For string Series resulting values are returned as strings.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_describe.py
       :language: python
       :lines: 39-
       :caption: Generate descriptive statistics.
       :name: ex_series_describe

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

    .. seealso::

        :ref:`DataFrame.count <pandas.DataFrame.count>`
            Count number of non-NA/null observations.

        :ref:`DataFrame.max <pandas.DataFrame.max>`
            Maximum of the values in the object.

        :ref:`DataFrame.min <pandas.DataFrame.min>`
            Minimum of the values in the object.

        :ref:`DataFrame.mean <pandas.DataFrame.mean>`
            Mean of the values.

        :ref:`DataFrame.std <pandas.DataFrame.std>`
            Standard deviation of the observations.

        :ref:`DataFrame.select_dtypes <pandas.DataFrame.select_dtypes>`
            Subset of a DataFrame including/excluding columns based on their dtype.

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

    .. only:: developer

       Tests: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_describe*
    """

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

    if not (isinstance(percentiles, (types.List, types.Array, types.UniTuple))
            and isinstance(percentiles.dtype, types.Number)
            or isinstance(percentiles, (types.Omitted, types.NoneType))
            or percentiles is None):
        ty_checker.raise_exc(percentiles, 'list-like', 'percentiles')

    if not (isinstance(include, (types.Omitted, types.NoneType)) or include is None):
        raise TypingError('{} Unsupported parameters. Given include: {}'.format(_func_name, include))

    if not (isinstance(exclude, (types.Omitted, types.NoneType)) or exclude is None):
        raise TypingError('{} Unsupported parameters. Given exclude: {}'.format(_func_name, exclude))

    is_percentiles_none = percentiles is None or isinstance(percentiles, (types.Omitted, types.NoneType))

    if isinstance(self.dtype, types.Number):
        def hpat_pandas_series_describe_numeric_impl(self, percentiles=None, include=None, exclude=None):

            if is_percentiles_none == False:  # noqa
                percentiles_list = list(percentiles)
                median_in_percentiles = 0.5 in percentiles_list
                if not median_in_percentiles:
                    percentiles_list.append(0.5)
                sorted_percentiles = sorted(percentiles_list)

                # check percentiles have correct values:
                arr = numpy.asarray(sorted_percentiles).astype(numpy.float64)
                if len(numpy.unique(arr)) != len(arr):
                    raise ValueError("percentiles cannot contain duplicates")
                if numpy.any(arr[(arr < 0) * (arr > 1)]):
                    raise ValueError("percentiles should all be in the interval [0, 1].")

                # TODO: support proper rounding of percentiles like in pandas.io.formats.format.format_percentiles
                # requires numpy.round(precision), numpy.isclose to be supported by Numba
                percentiles_indexes = common_functions._sdc_pandas_format_percentiles(arr)
            else:
                sorted_percentiles = [0.25, 0.5, 0.75]
                percentiles_indexes = ['25%', '50%', '75%']

            index_strings = ['count', 'mean', 'std', 'min']
            index_strings.extend(percentiles_indexes)
            index_strings.append('max')

            values = []
            values.append(numpy.float64(self.count()))
            values.append(self.mean())
            values.append(self.std())
            values.append(self.min())
            for p in sorted_percentiles:
                values.append(self.quantile(p))
            values.append(self.max())

            return pandas.Series(values, index_strings)

        return hpat_pandas_series_describe_numeric_impl

    elif isinstance(self.dtype, types.UnicodeType):
        def hpat_pandas_series_describe_string_impl(self, percentiles=None, include=None, exclude=None):

            objcounts = self.value_counts()
            index_strings = ['count', 'unique', 'top', 'freq']

            # use list of strings for the output series, since Numba doesn't support np.arrays with object dtype
            values = []
            values.append(str(self.count()))
            values.append(str(len(self.unique())))
            values.append(str(objcounts.index[0]))
            values.append(str(objcounts.iloc[0]))

            return pandas.Series(values, index_strings)

        return hpat_pandas_series_describe_string_impl

    elif isinstance(self.dtype, (types.NPDatetime, types.NPTimedelta)):
        # TODO: provide specialization for (types.NPDatetime, types.NPTimedelta)
        # needs dropna for date-time series, conversion to int and tz_convert to be implemented
        return None

    return None
def hpat_pandas_series_describe ( self , percentiles = None , include = None , exclude = None ) : _func_name = 'Method describe().' ty_checker = TypeChecker ( _func_name ) ty_checker . check ( self , SeriesType ) if not ( isinstance ( percentiles , ( types . List , types . Array , types . UniTuple ) ) and isinstance ( percentiles . dtype , types . Number ) or isinstance ( percentiles , ( types . Omitted , types . NoneType ) ) or percentiles is None ) : ty_checker . raise_exc ( percentiles , 'list-like' , 'percentiles' ) if not ( isinstance ( include , ( types . Omitted , types . NoneType ) ) or include is None ) : raise TypingError ( '{} Unsupported parameters. Given include: {}' . format ( _func_name , include ) ) if not ( isinstance ( exclude , ( types . Omitted , types . NoneType ) ) or exclude is None ) : raise TypingError ( '{} Unsupported parameters. Given exclude: {}' . format ( _func_name , exclude ) ) is_percentiles_none = percentiles is None or isinstance ( percentiles , ( types . Omitted , types . NoneType ) ) if isinstance ( self . dtype , types . Number ) : def hpat_pandas_series_describe_numeric_impl ( self , percentiles = None , include = None , exclude = None ) : if is_percentiles_none == False : # noqa percentiles_list = list ( percentiles ) median_in_percentiles = 0.5 in percentiles_list if not median_in_percentiles : percentiles_list . append ( 0.5 ) sorted_percentiles = sorted ( percentiles_list ) # check percentiles have correct values: arr = numpy . asarray ( sorted_percentiles ) . astype ( numpy . float64 ) if len ( numpy . unique ( arr ) ) != len ( arr ) : raise ValueError ( "percentiles cannot contain duplicates" ) if numpy . any ( arr [ ( arr < 0 ) * ( arr > 1 ) ] ) : raise ValueError ( "percentiles should all be in the interval [0, 1]." ) # TODO: support proper rounding of percentiles like in pandas.io.formats.format.format_percentiles # requires numpy.round(precision), numpy.isclose to be supported by Numba percentiles_indexes = common_functions . _sdc_pandas_format_percentiles ( arr ) else : sorted_percentiles = [ 0.25 , 0.5 , 0.75 ] percentiles_indexes = [ '25%' , '50%' , '75%' ] index_strings = [ 'count' , 'mean' , 'std' , 'min' ] index_strings . extend ( percentiles_indexes ) index_strings . append ( 'max' ) values = [ ] values . append ( numpy . float64 ( self . count ( ) ) ) values . append ( self . mean ( ) ) values . append ( self . std ( ) ) values . append ( self . min ( ) ) for p in sorted_percentiles : values . append ( self . quantile ( p ) ) values . append ( self . max ( ) ) return pandas . Series ( values , index_strings ) return hpat_pandas_series_describe_numeric_impl elif isinstance ( self . dtype , types . UnicodeType ) : def hpat_pandas_series_describe_string_impl ( self , percentiles = None , include = None , exclude = None ) : objcounts = self . value_counts ( ) index_strings = [ 'count' , 'unique' , 'top' , 'freq' ] # use list of strings for the output series, since Numba doesn't support np.arrays with object dtype values = [ ] values . append ( str ( self . count ( ) ) ) values . append ( str ( len ( self . unique ( ) ) ) ) values . append ( str ( objcounts . index [ 0 ] ) ) values . append ( str ( objcounts . iloc [ 0 ] ) ) return pandas . Series ( values , index_strings ) return hpat_pandas_series_describe_string_impl elif isinstance ( self . dtype , ( types . NPDatetime , types . NPTimedelta ) ) : # TODO: provide specialization for (types.NPDatetime, types.NPTimedelta) # needs dropna for date-time series, conversion to int and tz_convert to be implemented return None return None