Repository: Zeroto521/my-data-toolkit

Issue:
MAINT: Add `sparse_output` for `OneHotEncoder` to compat with sklearn1.2
<!--
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
-->

- [x] closes https://github.com/Zeroto521/my-data-toolkit/actions/runs/3156312323/jobs/5135884971#step:5:960
- [x] whatsnew entry

In the latest (>= 1.1.2) sklearn version, `sparse` is replaced by `sparse_out`.
And `sparse` will be removed in 1.4


Discussion:
# [Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/726?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25) Report
> Merging [#726](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/726?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25) (060de45) into [main](https://codecov.io/gh/Zeroto521/my-data-toolkit/commit/b1f09150f1f2dee0d6423b57eac105b368952080?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25) (b1f0915) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.

```diff
@@           Coverage Diff           @@
##             main     #726   +/-   ##
=======================================
  Coverage   99.47%   99.47%           
=======================================
  Files         110      111    +1     
  Lines        1516     1520    +4     
  Branches      345      345           
=======================================
+ Hits         1508     1512    +4     
  Misses          2        2           
  Partials        6        6           
```


| [Impacted Files](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/726?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25) | Coverage Δ | |
|---|---|---|
| [dtoolkit/transformer/\_compat.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/726/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvX2NvbXBhdC5weQ==) | `100.00% <100.00%> (ø)` | |
| [dtoolkit/transformer/sklearn/OneHotEncoder.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/726/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvc2tsZWFybi9PbmVIb3RFbmNvZGVyLnB5) | `92.59% <100.00%> (+0.28%)` | :arrow_up: |

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=40%25)


Resolving patch:
diff --git a/dtoolkit/transformer/sklearn/OneHotEncoder.py b/dtoolkit/transformer/sklearn/OneHotEncoder.py
--- a/dtoolkit/transformer/sklearn/OneHotEncoder.py
+++ b/dtoolkit/transformer/sklearn/OneHotEncoder.py
@@ -106,6 +106,9 @@ def __init__(
         )
         self.categories_with_parent = categories_with_parent
 
+        # TODO: Remove the following line in sklearn 1.2.
+        self.sparse_output = sparse_output
+
         # compat with sklearn lower version
         # `_parameter_constraints` comes out at sklearn 1.2
         # TODO: delete this condition when required sklearn version is >= 1.2


Test patch: