(self, value=None, method=None, axis=None, inplace=False, limit=None, downcast=None)
Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.fillna

    Limitations
    -----------
    - Parameters ``method``, ``limit`` and ``downcast`` are currently unsupported
    by Intel Scalable Dataframe Compiler.
    - Parameter ``inplace`` is supported with literal value only.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_fillna.py
       :language: python
       :lines: 35-
       :caption: Fill NA/NaN values using the specified method.
       :name: ex_series_fillna

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

    .. seealso::

        `pandas.interpolate
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.interpolate.html#pandas.Series.interpolate>`_
            Fill NaN values using interpolation.

        `pandas.reindex
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.reindex.html#pandas.Series.reindex>`_
            Conform object to new index.

        `pandas.asfreq
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.asfreq.html#pandas.Series.asfreq>`_
            Convert TimeSeries to specified frequency.

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

    .. only:: developer
       Tests: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_fillna*
Intel Scalable Dataframe Compiler User Guide
    ********************************************
Intel Scalable Dataframe Compiler User Guide ********************************************
def hpat_pandas_series_fillna(self, value=None, method=None, axis=None, inplace=False, limit=None, downcast=None):
    """
    Intel Scalable Dataframe Compiler User Guide
    ********************************************

    Pandas API: pandas.Series.fillna

    Limitations
    -----------
    - Parameters ``method``, ``limit`` and ``downcast`` are currently unsupported
    by Intel Scalable Dataframe Compiler.
    - Parameter ``inplace`` is supported with literal value only.

    Examples
    --------
    .. literalinclude:: ../../../examples/series/series_fillna.py
       :language: python
       :lines: 35-
       :caption: Fill NA/NaN values using the specified method.
       :name: ex_series_fillna

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

    .. seealso::

        `pandas.interpolate
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.interpolate.html#pandas.Series.interpolate>`_
            Fill NaN values using interpolation.

        `pandas.reindex
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.reindex.html#pandas.Series.reindex>`_
            Conform object to new index.

        `pandas.asfreq
        <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.asfreq.html#pandas.Series.asfreq>`_
            Convert TimeSeries to specified frequency.

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

    .. only:: developer
       Tests: python -m sdc.runtests -k sdc.tests.test_series.TestSeries.test_series_fillna*
    """

    _func_name = 'Method fillna().'

    ty_checker = TypeChecker(_func_name)
    ty_checker.check(self, SeriesType)

    if not (isinstance(axis, (types.Integer, types.StringLiteral, types.UnicodeType, types.Omitted)) or axis is None):
        ty_checker.raise_exc(axis, 'int or str', 'axis')

    if not (isinstance(inplace, types.Literal) and isinstance(inplace, types.Boolean)
            or isinstance(inplace, types.Omitted)
            or inplace is False):
        ty_checker.raise_exc(inplace, 'bool', 'inplace')

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

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

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

    # inplace value has to be known at compile time to select between implementations with different signatures
    if ((isinstance(inplace, types.Literal) and inplace.literal_value == True)
        or (isinstance(inplace, bool) and inplace == True)):
        # do operation inplace, fill the NA/NaNs in the same array and return None
        if isinstance(self.dtype, types.UnicodeType):
            # TODO: StringArrayType cannot resize inplace, and assigning a copy back to self._data is not possible now
            raise TypingError('{} Not implemented when Series dtype is {} and\
                 inplace={}'.format(_func_name, self.dtype, inplace))

        else:
            def hpat_pandas_series_fillna_impl(self, value=None, method=None, axis=None, inplace=False,
                                               limit=None, downcast=None):
                return numpy_like.fillna(self._data, inplace=inplace, value=value)

            return hpat_pandas_series_fillna_impl

    else:
        # non inplace implementations, copy array, fill the NA/NaN and return a new Series
        if isinstance(self.dtype, types.UnicodeType):
            def hpat_pandas_series_str_fillna_impl(self, value=None, method=None, axis=None,
                                                   inplace=False, limit=None, downcast=None):
                return pandas.Series(data=numpy_like.fillna(self._data, inplace=inplace, value=value),
                                     index=self._index,
                                     name=self._name)

            return hpat_pandas_series_str_fillna_impl

        elif isinstance(self.dtype, (types.Integer, types.Boolean)):
            def hpat_pandas_series_no_nan_fillna_impl(self, value=None, method=None, axis=None, inplace=False, limit=None, downcast=None):
                return pandas.Series(data=numpy_like.fillna(self._data, inplace=inplace, value=value),
                                     index=self._index,
                                     name=self._name)

            return hpat_pandas_series_no_nan_fillna_impl

        else:
            def hpat_pandas_series_fillna_impl(self, value=None, method=None, axis=None, inplace=False, limit=None, downcast=None):
                filled_data = numpy_like.fillna(self._data, inplace=inplace, value=value)
                return pandas.Series(data=filled_data,
                                     index=self._index,
                                     name=self._name)

            return hpat_pandas_series_fillna_impl
def hpat_pandas_series_fillna ( self , value = None , method = None , axis = None , inplace = False , limit = None , downcast = None ) : _func_name = 'Method fillna().' ty_checker = TypeChecker ( _func_name ) ty_checker . check ( self , SeriesType ) if not ( isinstance ( axis , ( types . Integer , types . StringLiteral , types . UnicodeType , types . Omitted ) ) or axis is None ) : ty_checker . raise_exc ( axis , 'int or str' , 'axis' ) if not ( isinstance ( inplace , types . Literal ) and isinstance ( inplace , types . Boolean ) or isinstance ( inplace , types . Omitted ) or inplace is False ) : ty_checker . raise_exc ( inplace , 'bool' , 'inplace' ) if not isinstance ( method , ( types . Omitted , types . NoneType ) ) and method is not None : ty_checker . raise_exc ( method , 'None' , 'method' ) if not isinstance ( limit , ( types . Omitted , types . NoneType ) ) and limit is not None : ty_checker . raise_exc ( limit , 'None' , 'limit' ) if not isinstance ( downcast , ( types . Omitted , types . NoneType ) ) and downcast is not None : ty_checker . raise_exc ( downcast , 'None' , 'downcast' ) # inplace value has to be known at compile time to select between implementations with different signatures if ( ( isinstance ( inplace , types . Literal ) and inplace . literal_value == True ) or ( isinstance ( inplace , bool ) and inplace == True ) ) : # do operation inplace, fill the NA/NaNs in the same array and return None if isinstance ( self . dtype , types . UnicodeType ) : # TODO: StringArrayType cannot resize inplace, and assigning a copy back to self._data is not possible now raise TypingError ( '{} Not implemented when Series dtype is {} and\
                 inplace={}' . format ( _func_name , self . dtype , inplace ) ) else : def hpat_pandas_series_fillna_impl ( self , value = None , method = None , axis = None , inplace = False , limit = None , downcast = None ) : return numpy_like . fillna ( self . _data , inplace = inplace , value = value ) return hpat_pandas_series_fillna_impl else : # non inplace implementations, copy array, fill the NA/NaN and return a new Series if isinstance ( self . dtype , types . UnicodeType ) : def hpat_pandas_series_str_fillna_impl ( self , value = None , method = None , axis = None , inplace = False , limit = None , downcast = None ) : return pandas . Series ( data = numpy_like . fillna ( self . _data , inplace = inplace , value = value ) , index = self . _index , name = self . _name ) return hpat_pandas_series_str_fillna_impl elif isinstance ( self . dtype , ( types . Integer , types . Boolean ) ) : def hpat_pandas_series_no_nan_fillna_impl ( self , value = None , method = None , axis = None , inplace = False , limit = None , downcast = None ) : return pandas . Series ( data = numpy_like . fillna ( self . _data , inplace = inplace , value = value ) , index = self . _index , name = self . _name ) return hpat_pandas_series_no_nan_fillna_impl else : def hpat_pandas_series_fillna_impl ( self , value = None , method = None , axis = None , inplace = False , limit = None , downcast = None ) : filled_data = numpy_like . fillna ( self . _data , inplace = inplace , value = value ) return pandas . Series ( data = filled_data , index = self . _index , name = self . _name ) return hpat_pandas_series_fillna_impl