Repository: Zeroto521/my-data-toolkit

Issue:
EHN: let pipeline support return `Series`
<!--
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 #380
- [x] whatsnew entry

The transformer is in charge of the specific transforming method.
The pipeline is in charge of connecting results from each transformer.

I don't want to rewrite every transformer, let them support dataframe or series data structure. 
So pipeline should be rebuilt. If the inputting of a transformer from the last transformer is dataframe or series, its outputting should be dataframe or series too.


Discussion:
# [Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) Report
> Merging [#431](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) (93994f8) into [main](https://codecov.io/gh/Zeroto521/my-data-toolkit/commit/08f77df2982cc0607ba4ed9520492f12d000dfea?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) (08f77df) will **decrease** coverage by `0.29%`.
> The diff coverage is `98.16%`.

[![Impacted file tree graph](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/graphs/tree.svg?width=650&height=150&src=pr&token=ukBguscD8E&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero)](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero)

```diff
@@            Coverage Diff             @@
##             main     #431      +/-   ##
==========================================
- Coverage   99.81%   99.52%   -0.30%     
==========================================
  Files          23       24       +1     
  Lines         549      629      +80     
  Branches       73       82       +9     
==========================================
+ Hits          548      626      +78     
- Misses          0        1       +1     
- Partials        1        2       +1     
```


| [Impacted Files](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero) | Coverage Δ | |
|---|---|---|
| [dtoolkit/transformer/pandas.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvcGFuZGFzLnB5) | `100.00% <ø> (ø)` | |
| [dtoolkit/transformer/pipeline.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvcGlwZWxpbmUucHk=) | `97.43% <97.43%> (ø)` | |
| [dtoolkit/transformer/\_\_init\_\_.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | |
| [dtoolkit/transformer/\_util.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvX3V0aWwucHk=) | `100.00% <100.00%> (ø)` | |
| [dtoolkit/transformer/base.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvYmFzZS5weQ==) | `100.00% <100.00%> (ø)` | |
| [dtoolkit/transformer/numpy.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvbnVtcHkucHk=) | `100.00% <100.00%> (ø)` | |
| [dtoolkit/transformer/sklearn.py](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero#diff-ZHRvb2xraXQvdHJhbnNmb3JtZXIvc2tsZWFybi5weQ==) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?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/431?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Zero). Last update [08f77df...93994f8](https://codecov.io/gh/Zeroto521/my-data-toolkit/pull/431?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/transformer/sklearn.py b/dtoolkit/transformer/sklearn.py
--- a/dtoolkit/transformer/sklearn.py
+++ b/dtoolkit/transformer/sklearn.py
@@ -26,6 +26,12 @@ class MinMaxScaler(SKMinMaxScaler):
     """
     Transform features by scaling each feature to a given range.
 
+    .. warning::
+        Transformer :class:`dtoolkit.transformer.MinMaxScaler` is deprecated and
+        will be removed in 0.0.13.
+        Please use :class:`sklearn.preprocessing.MinMaxScaler` instead.
+        (Warning added DToolKit 0.0.12)
+
     The transformation is given by::
 
         X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0))
@@ -57,6 +63,24 @@ class MinMaxScaler(SKMinMaxScaler):
     :obj:`~pandas.DataFrame` out.
     """
 
+    @doc(SKMinMaxScaler.__init__)
+    def __init__(self, feature_range=(0, 1), *, copy=True, clip=False):
+        from warnings import warn
+
+        warn(
+            "Transformer 'dtoolkit.transformer.MinMaxScaler' is deprecated and "
+            "will be removed in 0.0.13. "
+            "Please use 'sklearn.preprocessing.MinMaxScaler' instead. "
+            "(Warning added DToolKit 0.0.12)",
+            DeprecationWarning,
+        )
+
+        super().__init__(
+            feature_range=feature_range,
+            copy=copy,
+            clip=clip,
+        )
+
     @doc(SKMinMaxScaler.fit)
     def fit(self, X, y=None):
         X = transform_series_to_frame(X)


Test patch: