def fillna(self, value: Optional[Union[(Any, Dict[(Name, Any)])]]=None, method: Optional[str]=None, axis: Optional[Axis]=None, inplace: bool=False, limit: Optional[int]=None) -> Optional['DataFrame']:
    "Fill NA/NaN values.\n\n        .. note:: the current implementation of 'method' parameter in fillna uses Spark's Window\n            without specifying partition specification. This leads to move all data into\n            single partition in single machine and could cause serious\n            performance degradation. Avoid this method against very large dataset.\n\n        Parameters\n        ----------\n        value : scalar, dict, Series\n            Value to use to fill holes. alternately a dict/Series of values\n            specifying which value to use for each column.\n            DataFrame is not supported.\n        method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None\n            Method to use for filling holes in reindexed Series pad / ffill: propagate last valid\n            observation forward to next valid backfill / bfill:\n            use NEXT valid observation to fill gap\n        axis : {0 or `index`}\n            1 and `columns` are not supported.\n        inplace : boolean, default False\n            Fill in place (do not create a new object)\n        limit : int, default None\n            If method is specified, this is the maximum number of consecutive NaN values to\n            forward/backward fill. In other words, if there is a gap with more than this number of\n            consecutive NaNs, it will only be partially filled. If method is not specified,\n            this is the maximum number of entries along the entire axis where NaNs will be filled.\n            Must be greater than 0 if not None\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with NA entries filled.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({\n        ...     'A': [None, 3, None, None],\n        ...     'B': [2, 4, None, 3],\n        ...     'C': [None, None, None, 1],\n        ...     'D': [0, 1, 5, 4]\n        ...     },\n        ...     columns=['A', 'B', 'C', 'D'])\n        >>> df\n             A    B    C  D\n        0  NaN  2.0  NaN  0\n        1  3.0  4.0  NaN  1\n        2  NaN  NaN  NaN  5\n        3  NaN  3.0  1.0  4\n\n        Replace all NaN elements with 0s.\n\n        >>> df.fillna(0)\n             A    B    C  D\n        0  0.0  2.0  0.0  0\n        1  3.0  4.0  0.0  1\n        2  0.0  0.0  0.0  5\n        3  0.0  3.0  1.0  4\n\n        We can also propagate non-null values forward or backward.\n\n        >>> df.fillna(method='ffill')\n             A    B    C  D\n        0  NaN  2.0  NaN  0\n        1  3.0  4.0  NaN  1\n        2  3.0  4.0  NaN  5\n        3  3.0  3.0  1.0  4\n\n        Replace all NaN elements in column 'A', 'B', 'C', and 'D', with 0, 1,\n        2, and 3 respectively.\n\n        >>> values = {'A': 0, 'B': 1, 'C': 2, 'D': 3}\n        >>> df.fillna(value=values)\n             A    B    C  D\n        0  0.0  2.0  2.0  0\n        1  3.0  4.0  2.0  1\n        2  0.0  1.0  2.0  5\n        3  0.0  3.0  1.0  4\n        "
    axis = validate_axis(axis)
    if (axis != 0):
        raise NotImplementedError("fillna currently only works for axis=0 or axis='index'")
    if (value is not None):
        if (not isinstance(value, (float, int, str, bool, dict, pd.Series))):
            raise TypeError(('Unsupported type %s' % type(value).__name__))
        if (limit is not None):
            raise ValueError('limit parameter for value is not support now')
        if isinstance(value, pd.Series):
            value = value.to_dict()
        if isinstance(value, dict):
            for v in value.values():
                if (not isinstance(v, (float, int, str, bool))):
                    raise TypeError(('Unsupported type %s' % type(v).__name__))
            value = {(k if is_name_like_tuple(k) else (k,)): v for (k, v) in value.items()}

            def op(psser: ps.Series) -> ps.Series:
                label = psser._column_label
                for (k, v) in value.items():
                    if (k == label[:len(k)]):
                        return psser._fillna(value=value[k], method=method, axis=axis, limit=limit)
                else:
                    return psser
        else:

            def op(psser: ps.Series) -> ps.Series:
                return psser._fillna(value=value, method=method, axis=axis, limit=limit)
    elif (method is not None):

        def op(psser: ps.Series) -> ps.Series:
            return psser._fillna(value=value, method=method, axis=axis, limit=limit)
    else:
        raise ValueError("Must specify a fillna 'value' or 'method' parameter.")
    psdf = self._apply_series_op(op, should_resolve=(method is not None))
    inplace = validate_bool_kwarg(inplace, 'inplace')
    if inplace:
        self._update_internal_frame(psdf._internal, requires_same_anchor=False)
        return None
    else:
        return psdf
Fill NA/NaN values.

.. note:: the current implementation of 'method' parameter in fillna uses Spark's Window
    without specifying partition specification. This leads to move all data into
    single partition in single machine and could cause serious
    performance degradation. Avoid this method against very large dataset.

Parameters
----------
value : scalar, dict, Series
    Value to use to fill holes. alternately a dict/Series of values
    specifying which value to use for each column.
    DataFrame is not supported.
method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None
    Method to use for filling holes in reindexed Series pad / ffill: propagate last valid
    observation forward to next valid backfill / bfill:
    use NEXT valid observation to fill gap
axis : {0 or `index`}
    1 and `columns` are not supported.
inplace : boolean, default False
    Fill in place (do not create a new object)
limit : int, default None
    If method is specified, this is the maximum number of consecutive NaN values to
    forward/backward fill. In other words, if there is a gap with more than this number of
    consecutive NaNs, it will only be partially filled. If method is not specified,
    this is the maximum number of entries along the entire axis where NaNs will be filled.
    Must be greater than 0 if not None

Returns
-------
DataFrame
    DataFrame with NA entries filled.

Examples
--------
>>> df = ps.DataFrame({
...     'A': [None, 3, None, None],
...     'B': [2, 4, None, 3],
...     'C': [None, None, None, 1],
...     'D': [0, 1, 5, 4]
...     },
...     columns=['A', 'B', 'C', 'D'])
>>> df
     A    B    C  D
0  NaN  2.0  NaN  0
1  3.0  4.0  NaN  1
2  NaN  NaN  NaN  5
3  NaN  3.0  1.0  4

Replace all NaN elements with 0s.

>>> df.fillna(0)
     A    B    C  D
0  0.0  2.0  0.0  0
1  3.0  4.0  0.0  1
2  0.0  0.0  0.0  5
3  0.0  3.0  1.0  4

We can also propagate non-null values forward or backward.

>>> df.fillna(method='ffill')
     A    B    C  D
0  NaN  2.0  NaN  0
1  3.0  4.0  NaN  1
2  3.0  4.0  NaN  5
3  3.0  3.0  1.0  4

Replace all NaN elements in column 'A', 'B', 'C', and 'D', with 0, 1,
2, and 3 respectively.

>>> values = {'A': 0, 'B': 1, 'C': 2, 'D': 3}
>>> df.fillna(value=values)
     A    B    C  D
0  0.0  2.0  2.0  0
1  3.0  4.0  2.0  1
2  0.0  1.0  2.0  5
3  0.0  3.0  1.0  4
def fillna(self, value: Optional[Union[(Any, Dict[(Name, Any)])]]=None, method: Optional[str]=None, axis: Optional[Axis]=None, inplace: bool=False, limit: Optional[int]=None) -> Optional['DataFrame']:
    "Fill NA/NaN values.\n\n        .. note:: the current implementation of 'method' parameter in fillna uses Spark's Window\n            without specifying partition specification. This leads to move all data into\n            single partition in single machine and could cause serious\n            performance degradation. Avoid this method against very large dataset.\n\n        Parameters\n        ----------\n        value : scalar, dict, Series\n            Value to use to fill holes. alternately a dict/Series of values\n            specifying which value to use for each column.\n            DataFrame is not supported.\n        method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None\n            Method to use for filling holes in reindexed Series pad / ffill: propagate last valid\n            observation forward to next valid backfill / bfill:\n            use NEXT valid observation to fill gap\n        axis : {0 or `index`}\n            1 and `columns` are not supported.\n        inplace : boolean, default False\n            Fill in place (do not create a new object)\n        limit : int, default None\n            If method is specified, this is the maximum number of consecutive NaN values to\n            forward/backward fill. In other words, if there is a gap with more than this number of\n            consecutive NaNs, it will only be partially filled. If method is not specified,\n            this is the maximum number of entries along the entire axis where NaNs will be filled.\n            Must be greater than 0 if not None\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with NA entries filled.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({\n        ...     'A': [None, 3, None, None],\n        ...     'B': [2, 4, None, 3],\n        ...     'C': [None, None, None, 1],\n        ...     'D': [0, 1, 5, 4]\n        ...     },\n        ...     columns=['A', 'B', 'C', 'D'])\n        >>> df\n             A    B    C  D\n        0  NaN  2.0  NaN  0\n        1  3.0  4.0  NaN  1\n        2  NaN  NaN  NaN  5\n        3  NaN  3.0  1.0  4\n\n        Replace all NaN elements with 0s.\n\n        >>> df.fillna(0)\n             A    B    C  D\n        0  0.0  2.0  0.0  0\n        1  3.0  4.0  0.0  1\n        2  0.0  0.0  0.0  5\n        3  0.0  3.0  1.0  4\n\n        We can also propagate non-null values forward or backward.\n\n        >>> df.fillna(method='ffill')\n             A    B    C  D\n        0  NaN  2.0  NaN  0\n        1  3.0  4.0  NaN  1\n        2  3.0  4.0  NaN  5\n        3  3.0  3.0  1.0  4\n\n        Replace all NaN elements in column 'A', 'B', 'C', and 'D', with 0, 1,\n        2, and 3 respectively.\n\n        >>> values = {'A': 0, 'B': 1, 'C': 2, 'D': 3}\n        >>> df.fillna(value=values)\n             A    B    C  D\n        0  0.0  2.0  2.0  0\n        1  3.0  4.0  2.0  1\n        2  0.0  1.0  2.0  5\n        3  0.0  3.0  1.0  4\n        "
    axis = validate_axis(axis)
    if (axis != 0):
        raise NotImplementedError("fillna currently only works for axis=0 or axis='index'")
    if (value is not None):
        if (not isinstance(value, (float, int, str, bool, dict, pd.Series))):
            raise TypeError(('Unsupported type %s' % type(value).__name__))
        if (limit is not None):
            raise ValueError('limit parameter for value is not support now')
        if isinstance(value, pd.Series):
            value = value.to_dict()
        if isinstance(value, dict):
            for v in value.values():
                if (not isinstance(v, (float, int, str, bool))):
                    raise TypeError(('Unsupported type %s' % type(v).__name__))
            value = {(k if is_name_like_tuple(k) else (k,)): v for (k, v) in value.items()}

            def op(psser: ps.Series) -> ps.Series:
                label = psser._column_label
                for (k, v) in value.items():
                    if (k == label[:len(k)]):
                        return psser._fillna(value=value[k], method=method, axis=axis, limit=limit)
                else:
                    return psser
        else:

            def op(psser: ps.Series) -> ps.Series:
                return psser._fillna(value=value, method=method, axis=axis, limit=limit)
    elif (method is not None):

        def op(psser: ps.Series) -> ps.Series:
            return psser._fillna(value=value, method=method, axis=axis, limit=limit)
    else:
        raise ValueError("Must specify a fillna 'value' or 'method' parameter.")
    psdf = self._apply_series_op(op, should_resolve=(method is not None))
    inplace = validate_bool_kwarg(inplace, 'inplace')
    if inplace:
        self._update_internal_frame(psdf._internal, requires_same_anchor=False)
        return None
    else:
        return psdf