(self, inplace=False, value=None)
Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Parallel replacement of fillna.
    .. only:: developer
       Test: python -m sdc.runtests sdc.tests.test_sdc_numpy -k fillna
Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Parallel replacement of fillna.
    .. only:: developer
       Test: python -m sdc.runtests sdc.tests.test_sdc_numpy -k fillna
Intel Scalable Dataframe Compiler Developer Guide ************************************************* Parallel replacement of fillna . .. only :: developer Test : python - m sdc . runtests sdc . tests . test_sdc_numpy - k fillna
def sdc_fillna_overload(self, inplace=False, value=None):
    """
    Intel Scalable Dataframe Compiler Developer Guide
    *************************************************
    Parallel replacement of fillna.
    .. only:: developer
       Test: python -m sdc.runtests sdc.tests.test_sdc_numpy -k fillna
    """
    if not isinstance(self, (types.Array, StringArrayType)):
        return None

    if not isinstance(inplace, (types.Literal, types.Omitted) or inplace is False):
        return None

    dtype = self.dtype
    isnan = get_isnan(dtype)

    if (isinstance(inplace, types.Literal) and inplace.literal_value is True):

        def sdc_fillna_inplace_noop(self, inplace=False, value=None):
            return None

        if isinstance(value, (types.NoneType, types.Omitted)) or value is None:
            return sdc_fillna_inplace_noop

        if isinstance(dtype, (types.Integer, types.Boolean)):
            return sdc_fillna_inplace_noop

        if isinstance(dtype, types.Float):
            def sdc_fillna_inplace_float_impl(self, inplace=False, value=None):
                _value = np.nan if value is None else value
                length = len(self)
                for i in prange(length):
                    if isnan(self[i]):
                        self[i] = _value
                return None

            return sdc_fillna_inplace_float_impl

        if isinstance(dtype, types.UnicodeType):
            # TO-DO: not supported, since no generic setitem for StringArray
            return None

    else:

        def sdc_fillna_noop(self, inplace=False, value=None):
            return copy(self)

        if isinstance(value, (types.NoneType, types.Omitted)) or value is None:
            return sdc_fillna_noop

        if isinstance(dtype, (types.Integer, types.Boolean)):
            return sdc_fillna_noop

        if isinstance(dtype, types.Float):
            def sdc_fillna_impl(self, inplace=False, value=None):
                _value = np.nan if value is None else value
                length = len(self)
                filled_data = numpy.empty(length, dtype=dtype)
                for i in prange(length):
                    if isnan(self[i]):
                        filled_data[i] = _value
                    else:
                        filled_data[i] = self[i]
                return filled_data

            return sdc_fillna_impl

        if isinstance(self.dtype, types.UnicodeType):
            def sdc_fillna_str_impl(self, inplace=False, value=None):
                n = len(self)
                num_chars = 0
                # get total chars in new array
                for i in prange(n):
                    s = self[i]
                    if sdc.hiframes.api.isna(self, i):
                        num_chars += get_utf8_size(value)
                    else:
                        num_chars += get_utf8_size(s)

                filled_data = pre_alloc_string_array(n, num_chars)
                # StringArray doesn't support parallel setitem, thus no prange here
                for i in numpy.arange(n):
                    if sdc.hiframes.api.isna(self, i):
                        filled_data[i] = value
                    else:
                        filled_data[i] = self[i]
                return filled_data

            return sdc_fillna_str_impl
def sdc_fillna_overload ( self , inplace = False , value = None ) : if not isinstance ( self , ( types . Array , StringArrayType ) ) : return None if not isinstance ( inplace , ( types . Literal , types . Omitted ) or inplace is False ) : return None dtype = self . dtype isnan = get_isnan ( dtype ) if ( isinstance ( inplace , types . Literal ) and inplace . literal_value is True ) : def sdc_fillna_inplace_noop ( self , inplace = False , value = None ) : return None if isinstance ( value , ( types . NoneType , types . Omitted ) ) or value is None : return sdc_fillna_inplace_noop if isinstance ( dtype , ( types . Integer , types . Boolean ) ) : return sdc_fillna_inplace_noop if isinstance ( dtype , types . Float ) : def sdc_fillna_inplace_float_impl ( self , inplace = False , value = None ) : _value = np . nan if value is None else value length = len ( self ) for i in prange ( length ) : if isnan ( self [ i ] ) : self [ i ] = _value return None return sdc_fillna_inplace_float_impl if isinstance ( dtype , types . UnicodeType ) : # TO-DO: not supported, since no generic setitem for StringArray return None else : def sdc_fillna_noop ( self , inplace = False , value = None ) : return copy ( self ) if isinstance ( value , ( types . NoneType , types . Omitted ) ) or value is None : return sdc_fillna_noop if isinstance ( dtype , ( types . Integer , types . Boolean ) ) : return sdc_fillna_noop if isinstance ( dtype , types . Float ) : def sdc_fillna_impl ( self , inplace = False , value = None ) : _value = np . nan if value is None else value length = len ( self ) filled_data = numpy . empty ( length , dtype = dtype ) for i in prange ( length ) : if isnan ( self [ i ] ) : filled_data [ i ] = _value else : filled_data [ i ] = self [ i ] return filled_data return sdc_fillna_impl if isinstance ( self . dtype , types . UnicodeType ) : def sdc_fillna_str_impl ( self , inplace = False , value = None ) : n = len ( self ) num_chars = 0 # get total chars in new array for i in prange ( n ) : s = self [ i ] if sdc . hiframes . api . isna ( self , i ) : num_chars += get_utf8_size ( value ) else : num_chars += get_utf8_size ( s ) filled_data = pre_alloc_string_array ( n , num_chars ) # StringArray doesn't support parallel setitem, thus no prange here for i in numpy . arange ( n ) : if sdc . hiframes . api . isna ( self , i ) : filled_data [ i ] = value else : filled_data [ i ] = self [ i ] return filled_data return sdc_fillna_str_impl