Repository: dask/dask
File: dask/dataframe/groupby.py (Python)

Code before:
            min_periods=min_periods,
            center=center,
            win_type=win_type,
            axis=axis,
        )

    def _normalize_axis(self, axis, method: str):
        if PANDAS_GE_210 and axis is not no_default:
            if axis in (0, "index"):
                warnings.warn(
                    f"The 'axis' keyword in {type(self).__name__}.{method} is deprecated and will "
                    "be removed in a future version. Call without passing 'axis' instead.",
                    FutureWarning,
                )
            else:
                warnings.warn(
                    f"{type(self).__name__}.{method} with axis={axis} is deprecated and will be removed "
                    "in a future version. Operate on the un-grouped DataFrame instead",
                    FutureWarning,
                )
        if axis is no_default:
            axis = 0

        if axis in ("index", 1):
            warnings.warn(
                "Using axis=1 in GroupBy does not require grouping, will be removed "
                "entirely in a future version.",
                FutureWarning,
            )

        return axis

    @_deprecated(message="Please use `ffill`/`bfill` or `fillna` without a GroupBy.")
    def fillna(self, value=None, method=None, limit=None, axis=no_default):
        """Fill NA/NaN values using the specified method.

        Parameters
        ----------
        value : scalar, default None
            Value to use to fill holes (e.g. 0).
        method : {'bfill', 'ffill', None}, default None
            Method to use for filling holes in reindexed Series. ffill: propagate last
            valid observation forward to next valid. bfill: use next valid observation
            to fill gap.
        axis : {0 or 'index', 1 or 'columns'}
            Axis along which to fill missing values.
        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

Review comment (suggestion):
```suggestion
                "Using axis=1 in GroupBy does not require grouping and will be removed "
```

Code after:
            if axis in (0, "index"):
                warnings.warn(
                    f"The 'axis' keyword in {type(self).__name__}.{method} is deprecated and will "
                    "be removed in a future version. Call without passing 'axis' instead.",
                    FutureWarning,
                )
            else:
                warnings.warn(
                    f"{type(self).__name__}.{method} with axis={axis} is deprecated and will be removed "
                    "in a future version. Operate on the un-grouped DataFrame instead",
                    FutureWarning,
                )
        if axis is no_default:
            axis = 0

        if axis in ("index", 1):
            warnings.warn(
                "Using axis=1 in GroupBy does not require grouping and will be removed "
                "entirely in a future version.",
                FutureWarning,
            )

        return axis

    @_deprecated(message="Please use `ffill`/`bfill` or `fillna` without a GroupBy.")
    def fillna(self, value=None, method=None, limit=None, axis=no_default):
        """Fill NA/NaN values using the specified method.

        Parameters
        ----------
        value : scalar, default None
            Value to use to fill holes (e.g. 0).
        method : {'bfill', 'ffill', None}, default None
            Method to use for filling holes in reindexed Series. ffill: propagate last
            valid observation forward to next valid. bfill: use next valid observation
            to fill gap.
        axis : {0 or 'index', 1 or 'columns'}
            Axis along which to fill missing values.
        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
        -------
        Series or DataFrame
            Object with missing values filled

        See also