Repository: Zeroto521/my-data-toolkit

Issue:
DEP: Drop `inplace` option of `filter_in`
<!--
Thanks for contributing a pull request!

Please follow these standard acronyms to start the commit message:

- ENH: enhancement
- BUG: bug fix
- DOC: documentation
- TYP: type annotations
- TST: addition or modification of tests
- MAINT: maintenance commit (refactoring, typos, etc.)
- BLD: change related to building
- REL: related to releasing
- API: an (incompatible) API change
- DEP: deprecate something, or remove a deprecated object
- DEV: development tool or utility
- REV: revert an earlier commit
- PERF: performance improvement
- BOT: always commit via a bot
- CI: related to CI or CD
- CLN: Code cleanup
-->

- [ ] closes #xxxx
- [x] whatsnew entry

Refer other `filter` methods. There don't have `inplace` option.


Discussion:
# [Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) Report
> Merging [#518](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) (bed3b21) into [main](https://codecov.io/gh/Zeroto521/my-data-toolkit/commit/e040daeee2f9013a5320f246cce006a7578f5f57?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) (e040dae) will **decrease** coverage by `0.00%`.
> The diff coverage is `100.00%`.

```diff
@@            Coverage Diff             @@
##             main     #518      +/-   ##
==========================================
- Coverage   99.65%   99.64%   -0.01%     
==========================================
  Files          61       61              
  Lines         858      853       -5     
  Branches      102      101       -1     
==========================================
- Hits          855      850       -5     
  Misses          1        1              
  Partials        2        2              
```


| [Impacted Files](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) | Coverage Δ | |
|---|---|---|
| [dtoolkit/accessor/dataframe/filter\_in.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvYWNjZXNzb3IvZGF0YWZyYW1lL2ZpbHRlcl9pbi5weQ==) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero). Last update [e040dae...bed3b21](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/518?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero).


Resolving patch:
diff --git a/dtoolkit/accessor/dataframe/drop_inf.py b/dtoolkit/accessor/dataframe/drop_inf.py
--- a/dtoolkit/accessor/dataframe/drop_inf.py
+++ b/dtoolkit/accessor/dataframe/drop_inf.py
@@ -2,31 +2,21 @@
 
 import numpy as np
 import pandas as pd
-from pandas.util._validators import validate_bool_kwarg
 
 from dtoolkit._typing import IntOrStr
 from dtoolkit.accessor.dataframe import boolean  # noqa
 from dtoolkit.accessor.register import register_dataframe_method
 from dtoolkit.accessor.series.drop_inf import get_inf_range
-from dtoolkit.util._decorator import deprecated_kwargs
 
 
 @register_dataframe_method
-@deprecated_kwargs(
-    "inplace",
-    message=(
-        "The keyword argument '{argument}' of '{func_name}' is deprecated and will "
-        "be removed in 0.0.17. (Warning added DToolKit 0.0.16)"
-    ),
-)
 def drop_inf(
     df: pd.DataFrame,
     axis: IntOrStr = 0,
     how: str = "any",
     inf: str = "all",
     subset: list[str] = None,
-    inplace: bool = False,
-) -> pd.DataFrame | None:
+) -> pd.DataFrame:
     """
     Remove ``inf`` values.
 
@@ -55,18 +45,10 @@ def drop_inf(
         Labels along other axis to consider, e.g. if you are dropping rows
         these would be a list of columns to include.
 
-    inplace : bool, default False
-        If True, do operation inplace and return None.
-
-        .. deprecated:: 0.0.17
-            'inplace' is deprecated and will be removed in 0.0.17.
-            (Warning added DToolKit 0.0.16)
-
     Returns
     -------
-    DataFrame or None
-        DataFrame with ``inf`` entries dropped from it or None if
-        ``inplace=True``.
+    DataFrame
+        DataFrame with ``inf`` entries dropped from it.
 
     See Also
     --------
@@ -125,14 +107,8 @@ def drop_inf(
     2  Catwoman   Bullwhip                 -inf
 
     Keep the DataFrame with valid entries in the same variable.
-
-    >>> df.drop_inf(inplace=True)
-    >>> df
-           name        toy                 born
-    1    Batman  Batmobile  1940-04-25 00:00:00
     """
 
-    inplace = validate_bool_kwarg(inplace, "inplace")
     inf_range = get_inf_range(inf)
     axis = df._get_axis_number(axis)
     agg_axis = 1 - axis
@@ -148,9 +124,4 @@ def drop_inf(
         agg_obj = df.take(indices, axis=agg_axis)
 
     mask = agg_obj.isin(inf_range).boolean(how=how, axis=agg_axis)
-    result = df.loc(axis=axis)[~mask]
-
-    if not inplace:
-        return result
-
-    df._update_inplace(result)
+    return df.loc(axis=axis)[~mask]
diff --git a/dtoolkit/accessor/series/drop_inf.py b/dtoolkit/accessor/series/drop_inf.py
--- a/dtoolkit/accessor/series/drop_inf.py
+++ b/dtoolkit/accessor/series/drop_inf.py
@@ -2,25 +2,12 @@
 
 import numpy as np
 import pandas as pd
-from pandas.util._validators import validate_bool_kwarg
 
 from dtoolkit.accessor.register import register_series_method
-from dtoolkit.util._decorator import deprecated_kwargs
 
 
 @register_series_method
-@deprecated_kwargs(
-    "inplace",
-    message=(
-        "The keyword argument '{argument}' of '{func_name}' is deprecated and will "
-        "be removed in 0.0.17. (Warning added DToolKit 0.0.16)"
-    ),
-)
-def drop_inf(
-    s: pd.Series,
-    inf: str = "all",
-    inplace: bool = False,
-) -> pd.Series | None:
+def drop_inf(s: pd.Series, inf: str = "all") -> pd.Series:
     """
     Remove ``inf`` values.
 
@@ -32,18 +19,10 @@ def drop_inf(
         * 'pos' / '+' : Only remove ``inf``.
         * 'neg' / '-' : Only remove ``-inf``.
 
-    inplace : bool, default False
-        If True, do operation inplace and return None.
-
-        .. deprecated:: 0.0.17
-            'inplace' is deprecated and will be removed in 0.0.17.
-            (Warning added DToolKit 0.0.16)
-
     Returns
     -------
-    Series or None
-        Series with ``inf`` entries dropped from it or None if
-        ``inplace=True``.
+    Series
+        Series with ``inf`` entries dropped from it.
 
     See Also
     --------
@@ -69,25 +48,12 @@ def drop_inf(
     0    1.0
     1    2.0
     dtype: float64
-
-    Keep the Series with valid entries in the same variable.
-
-    >>> s.drop_inf(inplace=True)
-    >>> s
-    0    1.0
-    1    2.0
-    dtype: float64
     """
 
-    inplace = validate_bool_kwarg(inplace, "inplace")
     inf_range = get_inf_range(inf)
     mask = s.isin(inf_range)
-    result = s[~mask]
-
-    if not inplace:
-        return result
 
-    s._update_inplace(result)
+    return s[~mask]
 
 
 def get_inf_range(inf: str = "all") -> list[float]:


Test patch:
diff --git a/test/accessor/dataframe/test_drop_inf.py b/test/accessor/dataframe/test_drop_inf.py
--- a/test/accessor/dataframe/test_drop_inf.py
+++ b/test/accessor/dataframe/test_drop_inf.py
@@ -195,22 +195,3 @@ def test_work(df, axis, how, inf, subset, expt):
 def test_error(error, axis, how, subset):
     with pytest.raises(error):
         d.drop_inf(axis=axis, how=how, subset=subset)
-
-
-def test_inplace_is_true():
-    self_d = pd.concat(
-        (
-            d,
-            pd.DataFrame(
-                {
-                    "a": [np.inf],
-                    "b": [-np.inf],
-                },
-            ),
-        ),
-        ignore_index=True,
-    )
-    result = self_d.drop_inf(inplace=True)
-
-    assert result is None
-    assert self_d.equals(d)
diff --git a/test/accessor/series/test_drop_inf.py b/test/accessor/series/test_drop_inf.py
--- a/test/accessor/series/test_drop_inf.py
+++ b/test/accessor/series/test_drop_inf.py
@@ -25,14 +25,6 @@ def test_work(inf, df, expt):
     assert result.equals(expt)
 
 
-def test_inplace_is_true():
-    self_s = pd.concat((s, s_inf))
-    result = self_s.drop_inf(inplace=True)
-
-    assert result is None
-    assert self_s.equals(s)
-
-
 @pytest.mark.parametrize(
     "error, inf",
     [