We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] ColumnSelect missing tag`"skip-inverse-transform"`
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
The ColumnSelect is missing the tag  `"skip-inverse-transform"`. Thus, a TransformedTargetForecaster subsetting the `y` input will fail when calling predict.

**To Reproduce**
<!--
Add a Minimal, Complete, and Verifiable example (for more details, see e.g. https://stackoverflow.com/help/mcve

If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com
-->



```python
from sktime.forecasting.naive import NaiveForecaster
from sktime.transformations.series.subset import ColumnSelect
from sktime.datasets import load_longley
y = load_longley()[1][["GNP", "UNEMP"]]
fc = ColumnSelect(["GNP"]) * NaiveForecaster()
fc.fit(y)
fc.predict(fh=[1])
```

**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
I would expect that the forecast is performed only on the selected time series without raising an error.

**Additional context**
<!--
Add any other context about the problem here.
-->
This would be fixed by just adding the tag `skip-inverse-transform` to ColumnSelect.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sktime/transformations/series/subset.py`
Content:
```
1 """Transformers for index and column subsetting."""
2 # copyright: sktime developers, BSD-3-Clause License (see LICENSE file).
3 
4 __author__ = ["fkiraly"]
5 
6 import pandas as pd
7 
8 from sktime.transformations.base import BaseTransformer
9 
10 
11 class IndexSubset(BaseTransformer):
12     r"""Index subsetting transformer.
13 
14     In transform, subsets `X` to the indices in `y.index`.
15     If `y` is None, returns `X` without subsetting.
16     numpy-based `X` are interpreted as having a RangeIndex starting at n,
17     where n is the number of numpy rows seen so far through `fit` and `update`.
18     Non-pandas types are interpreted as having index as after conversion to pandas,
19     via `datatypes.convert_to`, to the `"pd.DataFrame"` sktime type.
20 
21     Parameters
22     ----------
23     index_treatment : str, optional, one of "keep" (default) or "remove"
24         determines which indices are kept in `Xt = transform(X, y)`
25         "keep" = all indices in y also appear in Xt. If not present in X, NA is filled.
26         "remove" = only indices that appear in both X and y are present in Xt.
27 
28     Examples
29     --------
30     >>> from sktime.transformations.series.subset import IndexSubset
31     >>> from sktime.datasets import load_airline
32     >>> X = load_airline()[0:32]
33     >>> y = load_airline()[24:42]
34     >>> transformer = IndexSubset()
35     >>> X_subset = transformer.fit_transform(X=X, y=y)
36     """
37 
38     _tags = {
39         "scitype:transform-input": "Series",
40         # what is the scitype of X: Series, or Panel
41         "scitype:transform-output": "Series",
42         # what scitype is returned: Primitives, Series, Panel
43         "scitype:instancewise": True,  # is this an instance-wise transform?
44         "X_inner_mtype": ["pd.DataFrame", "pd.Series"],
45         "y_inner_mtype": ["pd.DataFrame", "pd.Series"],
46         "transform-returns-same-time-index": False,
47         "fit_is_empty": False,
48         "univariate-only": False,
49         "capability:inverse_transform": False,
50         "remember_data": True,  # remember all data seen as _X
51     }
52 
53     def __init__(self, index_treatment="keep"):
54         self.index_treatment = index_treatment
55         super().__init__()
56 
57     def _transform(self, X, y=None):
58         """Transform X and return a transformed version.
59 
60         private _transform containing the core logic, called from transform
61 
62         Parameters
63         ----------
64         X : pd.DataFrame or pd.Series
65             Data to be transformed
66         y : pd.DataFrame or pd.Series
67             Additional data, e.g., labels for transformation
68 
69         Returns
70         -------
71         Xt : pd.DataFrame or pd.Series, same type as X
72             transformed version of X
73         """
74         if y is None:
75             return X
76 
77         X = self._X
78 
79         index_treatment = self.index_treatment
80         ind_X_and_y = X.index.intersection(y.index)
81 
82         if index_treatment == "remove":
83             Xt = X.loc[ind_X_and_y]
84         elif index_treatment == "keep":
85             Xt = X.loc[ind_X_and_y]
86             y_idx_frame = type(X)(index=y.index, dtype="float64")
87             Xt = Xt.combine_first(y_idx_frame)
88         else:
89             raise ValueError(
90                 f'index_treatment must be one of "remove", "keep", but found'
91                 f' "{index_treatment}"'
92             )
93         return Xt
94 
95     @classmethod
96     def get_test_params(cls, parameter_set="default"):
97         """Return testing parameter settings for the estimator.
98 
99         Parameters
100         ----------
101         parameter_set : str, default="default"
102             Name of the set of test parameters to return, for use in tests. If no
103             special parameters are defined for a value, will return `"default"` set.
104             There are currently no reserved values for transformers.
105 
106         Returns
107         -------
108         params : dict or list of dict, default = {}
109             Parameters to create testing instances of the class
110             Each dict are parameters to construct an "interesting" test instance, i.e.,
111             `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
112             `create_test_instance` uses the first (or only) dictionary in `params`
113         """
114         params1 = {"index_treatment": "remove"}
115         params2 = {"index_treatment": "keep"}
116 
117         return [params1, params2]
118 
119 
120 class ColumnSelect(BaseTransformer):
121     r"""Column selection transformer.
122 
123     In transform, subsets `X` to `columns` provided as hyper-parameters.
124 
125     Sequence of columns in `Xt=transform(X)` is as in `columns` hyper-parameter.
126     Caveat: this means that `transform` may change sequence of columns,
127         even if no columns are removed from `X` in `transform(X)`.
128 
129     Parameters
130     ----------
131     columns : pandas compatible index or index coercible, optional, default = None
132         columns to which X in transform is to be subset
133     integer_treatment : str, optional, one of "col" (default) and "coerce"
134         determines how integer index columns are treated
135         "col" = subsets by column iloc index, even if columns is not in X.columns
136         "coerce" = coerces to integer pandas.Index and attempts to subset
137     index_treatment : str, optional, one of "remove" (default) or "keep"
138         determines which column are kept in `Xt = transform(X, y)`
139         "remove" = only indices that appear in both X and columns are present in Xt.
140         "keep" = all indices in columns appear in Xt. If not present in X, NA is filled.
141 
142     Examples
143     --------
144     >>> from sktime.transformations.series.subset import ColumnSelect
145     >>> from sktime.datasets import load_longley
146     >>> X = load_longley()[1]
147     >>> transformer =  ColumnSelect(columns=["GNPDEFL", "POP", "FOO"])
148     >>> X_subset = transformer.fit_transform(X=X)
149     """
150 
151     _tags = {
152         "scitype:transform-input": "Series",
153         # what is the scitype of X: Series, or Panel
154         "scitype:transform-output": "Series",
155         # what scitype is returned: Primitives, Series, Panel
156         "scitype:instancewise": True,  # is this an instance-wise transform?
157         "X_inner_mtype": ["pd.DataFrame", "pd-multiindex", "pd_multiindex_hier"],
158         "y_inner_mtype": "None",
159         "transform-returns-same-time-index": True,
160         "fit_is_empty": True,
161         "univariate-only": False,
162         "capability:inverse_transform": False,
163     }
164 
165     def __init__(self, columns=None, integer_treatment="col", index_treatment="remove"):
166         self.columns = columns
167         self.integer_treatment = integer_treatment
168         self.index_treatment = index_treatment
169         super().__init__()
170 
171     def _transform(self, X, y=None):
172         """Transform X and return a transformed version.
173 
174         private _transform containing the core logic, called from transform
175 
176         Parameters
177         ----------
178         X : pd.DataFrame
179             Data to be transformed
180         y : Ignored argument for interface compatibility
181 
182         Returns
183         -------
184         Xt : pd.DataFrame
185             transformed version of X
186         """
187         columns = self.columns
188         integer_treatment = self.integer_treatment
189         index_treatment = self.index_treatment
190 
191         if columns is None:
192             return X
193         if pd.api.types.is_scalar(columns):
194             columns = [columns]
195 
196         columns = pd.Index(columns)
197 
198         if integer_treatment == "col" and pd.api.types.is_integer_dtype(columns):
199             columns = [x for x in columns if x < len(X.columns)]
200             col_idx = X.columns[columns]
201             return X[col_idx]
202 
203         in_cols = columns.isin(X.columns)
204         col_X_and_cols = columns[in_cols]
205 
206         if index_treatment == "remove":
207             Xt = X[col_X_and_cols]
208         elif index_treatment == "keep":
209             Xt = X.reindex(columns=columns)
210         else:
211             raise ValueError(
212                 f'index_treatment must be one of "remove", "keep", but found'
213                 f' "{index_treatment}"'
214             )
215         return Xt
216 
217     @classmethod
218     def get_test_params(cls, parameter_set="default"):
219         """Return testing parameter settings for the estimator.
220 
221         Parameters
222         ----------
223         parameter_set : str, default="default"
224             Name of the set of test parameters to return, for use in tests. If no
225             special parameters are defined for a value, will return `"default"` set.
226             There are currently no reserved values for transformers.
227 
228         Returns
229         -------
230         params : dict or list of dict, default = {}
231             Parameters to create testing instances of the class
232             Each dict are parameters to construct an "interesting" test instance, i.e.,
233             `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
234             `create_test_instance` uses the first (or only) dictionary in `params`
235         """
236         params1 = {"columns": None}
237         params2 = {"columns": [0, 2, 3]}
238         params3 = {"columns": ["a", "foo", "bar"], "index_treatment": "keep"}
239         params4 = {"columns": "a", "index_treatment": "keep"}
240 
241         return [params1, params2, params3, params4]
242
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/sktime/transformations/series/subset.py b/sktime/transformations/series/subset.py
--- a/sktime/transformations/series/subset.py
+++ b/sktime/transformations/series/subset.py
@@ -160,6 +160,7 @@
         "fit_is_empty": True,
         "univariate-only": False,
         "capability:inverse_transform": False,
+        "skip-inverse-transform": True,
     }
 
     def __init__(self, columns=None, integer_treatment="col", index_treatment="remove"):

{"golden_diff": "diff --git a/sktime/transformations/series/subset.py b/sktime/transformations/series/subset.py\n--- a/sktime/transformations/series/subset.py\n+++ b/sktime/transformations/series/subset.py\n@@ -160,6 +160,7 @@\n         \"fit_is_empty\": True,\n         \"univariate-only\": False,\n         \"capability:inverse_transform\": False,\n+        \"skip-inverse-transform\": True,\n     }\n \n     def __init__(self, columns=None, integer_treatment=\"col\", index_treatment=\"remove\"):\n", "issue": "[BUG] ColumnSelect missing tag`\"skip-inverse-transform\"`\n**Describe the bug**\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\nThe ColumnSelect is missing the tag  `\"skip-inverse-transform\"`. Thus, a TransformedTargetForecaster subsetting the `y` input will fail when calling predict.\r\n\r\n**To Reproduce**\r\n<!--\r\nAdd a Minimal, Complete, and Verifiable example (for more details, see e.g. https://stackoverflow.com/help/mcve\r\n\r\nIf the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com\r\n-->\r\n\r\n\r\n\r\n```python\r\nfrom sktime.forecasting.naive import NaiveForecaster\r\nfrom sktime.transformations.series.subset import ColumnSelect\r\nfrom sktime.datasets import load_longley\r\ny = load_longley()[1][[\"GNP\", \"UNEMP\"]]\r\nfc = ColumnSelect([\"GNP\"]) * NaiveForecaster()\r\nfc.fit(y)\r\nfc.predict(fh=[1])\r\n```\r\n\r\n**Expected behavior**\r\n<!--\r\nA clear and concise description of what you expected to happen.\r\n-->\r\nI would expect that the forecast is performed only on the selected time series without raising an error.\r\n\r\n**Additional context**\r\n<!--\r\nAdd any other context about the problem here.\r\n-->\r\nThis would be fixed by just adding the tag `skip-inverse-transform` to ColumnSelect.\r\n\n", "before_files": [{"content": "\"\"\"Transformers for index and column subsetting.\"\"\"\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\n__author__ = [\"fkiraly\"]\n\nimport pandas as pd\n\nfrom sktime.transformations.base import BaseTransformer\n\n\nclass IndexSubset(BaseTransformer):\n    r\"\"\"Index subsetting transformer.\n\n    In transform, subsets `X` to the indices in `y.index`.\n    If `y` is None, returns `X` without subsetting.\n    numpy-based `X` are interpreted as having a RangeIndex starting at n,\n    where n is the number of numpy rows seen so far through `fit` and `update`.\n    Non-pandas types are interpreted as having index as after conversion to pandas,\n    via `datatypes.convert_to`, to the `\"pd.DataFrame\"` sktime type.\n\n    Parameters\n    ----------\n    index_treatment : str, optional, one of \"keep\" (default) or \"remove\"\n        determines which indices are kept in `Xt = transform(X, y)`\n        \"keep\" = all indices in y also appear in Xt. If not present in X, NA is filled.\n        \"remove\" = only indices that appear in both X and y are present in Xt.\n\n    Examples\n    --------\n    >>> from sktime.transformations.series.subset import IndexSubset\n    >>> from sktime.datasets import load_airline\n    >>> X = load_airline()[0:32]\n    >>> y = load_airline()[24:42]\n    >>> transformer = IndexSubset()\n    >>> X_subset = transformer.fit_transform(X=X, y=y)\n    \"\"\"\n\n    _tags = {\n        \"scitype:transform-input\": \"Series\",\n        # what is the scitype of X: Series, or Panel\n        \"scitype:transform-output\": \"Series\",\n        # what scitype is returned: Primitives, Series, Panel\n        \"scitype:instancewise\": True,  # is this an instance-wise transform?\n        \"X_inner_mtype\": [\"pd.DataFrame\", \"pd.Series\"],\n        \"y_inner_mtype\": [\"pd.DataFrame\", \"pd.Series\"],\n        \"transform-returns-same-time-index\": False,\n        \"fit_is_empty\": False,\n        \"univariate-only\": False,\n        \"capability:inverse_transform\": False,\n        \"remember_data\": True,  # remember all data seen as _X\n    }\n\n    def __init__(self, index_treatment=\"keep\"):\n        self.index_treatment = index_treatment\n        super().__init__()\n\n    def _transform(self, X, y=None):\n        \"\"\"Transform X and return a transformed version.\n\n        private _transform containing the core logic, called from transform\n\n        Parameters\n        ----------\n        X : pd.DataFrame or pd.Series\n            Data to be transformed\n        y : pd.DataFrame or pd.Series\n            Additional data, e.g., labels for transformation\n\n        Returns\n        -------\n        Xt : pd.DataFrame or pd.Series, same type as X\n            transformed version of X\n        \"\"\"\n        if y is None:\n            return X\n\n        X = self._X\n\n        index_treatment = self.index_treatment\n        ind_X_and_y = X.index.intersection(y.index)\n\n        if index_treatment == \"remove\":\n            Xt = X.loc[ind_X_and_y]\n        elif index_treatment == \"keep\":\n            Xt = X.loc[ind_X_and_y]\n            y_idx_frame = type(X)(index=y.index, dtype=\"float64\")\n            Xt = Xt.combine_first(y_idx_frame)\n        else:\n            raise ValueError(\n                f'index_treatment must be one of \"remove\", \"keep\", but found'\n                f' \"{index_treatment}\"'\n            )\n        return Xt\n\n    @classmethod\n    def get_test_params(cls, parameter_set=\"default\"):\n        \"\"\"Return testing parameter settings for the estimator.\n\n        Parameters\n        ----------\n        parameter_set : str, default=\"default\"\n            Name of the set of test parameters to return, for use in tests. If no\n            special parameters are defined for a value, will return `\"default\"` set.\n            There are currently no reserved values for transformers.\n\n        Returns\n        -------\n        params : dict or list of dict, default = {}\n            Parameters to create testing instances of the class\n            Each dict are parameters to construct an \"interesting\" test instance, i.e.,\n            `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.\n            `create_test_instance` uses the first (or only) dictionary in `params`\n        \"\"\"\n        params1 = {\"index_treatment\": \"remove\"}\n        params2 = {\"index_treatment\": \"keep\"}\n\n        return [params1, params2]\n\n\nclass ColumnSelect(BaseTransformer):\n    r\"\"\"Column selection transformer.\n\n    In transform, subsets `X` to `columns` provided as hyper-parameters.\n\n    Sequence of columns in `Xt=transform(X)` is as in `columns` hyper-parameter.\n    Caveat: this means that `transform` may change sequence of columns,\n        even if no columns are removed from `X` in `transform(X)`.\n\n    Parameters\n    ----------\n    columns : pandas compatible index or index coercible, optional, default = None\n        columns to which X in transform is to be subset\n    integer_treatment : str, optional, one of \"col\" (default) and \"coerce\"\n        determines how integer index columns are treated\n        \"col\" = subsets by column iloc index, even if columns is not in X.columns\n        \"coerce\" = coerces to integer pandas.Index and attempts to subset\n    index_treatment : str, optional, one of \"remove\" (default) or \"keep\"\n        determines which column are kept in `Xt = transform(X, y)`\n        \"remove\" = only indices that appear in both X and columns are present in Xt.\n        \"keep\" = all indices in columns appear in Xt. If not present in X, NA is filled.\n\n    Examples\n    --------\n    >>> from sktime.transformations.series.subset import ColumnSelect\n    >>> from sktime.datasets import load_longley\n    >>> X = load_longley()[1]\n    >>> transformer =  ColumnSelect(columns=[\"GNPDEFL\", \"POP\", \"FOO\"])\n    >>> X_subset = transformer.fit_transform(X=X)\n    \"\"\"\n\n    _tags = {\n        \"scitype:transform-input\": \"Series\",\n        # what is the scitype of X: Series, or Panel\n        \"scitype:transform-output\": \"Series\",\n        # what scitype is returned: Primitives, Series, Panel\n        \"scitype:instancewise\": True,  # is this an instance-wise transform?\n        \"X_inner_mtype\": [\"pd.DataFrame\", \"pd-multiindex\", \"pd_multiindex_hier\"],\n        \"y_inner_mtype\": \"None\",\n        \"transform-returns-same-time-index\": True,\n        \"fit_is_empty\": True,\n        \"univariate-only\": False,\n        \"capability:inverse_transform\": False,\n    }\n\n    def __init__(self, columns=None, integer_treatment=\"col\", index_treatment=\"remove\"):\n        self.columns = columns\n        self.integer_treatment = integer_treatment\n        self.index_treatment = index_treatment\n        super().__init__()\n\n    def _transform(self, X, y=None):\n        \"\"\"Transform X and return a transformed version.\n\n        private _transform containing the core logic, called from transform\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to be transformed\n        y : Ignored argument for interface compatibility\n\n        Returns\n        -------\n        Xt : pd.DataFrame\n            transformed version of X\n        \"\"\"\n        columns = self.columns\n        integer_treatment = self.integer_treatment\n        index_treatment = self.index_treatment\n\n        if columns is None:\n            return X\n        if pd.api.types.is_scalar(columns):\n            columns = [columns]\n\n        columns = pd.Index(columns)\n\n        if integer_treatment == \"col\" and pd.api.types.is_integer_dtype(columns):\n            columns = [x for x in columns if x < len(X.columns)]\n            col_idx = X.columns[columns]\n            return X[col_idx]\n\n        in_cols = columns.isin(X.columns)\n        col_X_and_cols = columns[in_cols]\n\n        if index_treatment == \"remove\":\n            Xt = X[col_X_and_cols]\n        elif index_treatment == \"keep\":\n            Xt = X.reindex(columns=columns)\n        else:\n            raise ValueError(\n                f'index_treatment must be one of \"remove\", \"keep\", but found'\n                f' \"{index_treatment}\"'\n            )\n        return Xt\n\n    @classmethod\n    def get_test_params(cls, parameter_set=\"default\"):\n        \"\"\"Return testing parameter settings for the estimator.\n\n        Parameters\n        ----------\n        parameter_set : str, default=\"default\"\n            Name of the set of test parameters to return, for use in tests. If no\n            special parameters are defined for a value, will return `\"default\"` set.\n            There are currently no reserved values for transformers.\n\n        Returns\n        -------\n        params : dict or list of dict, default = {}\n            Parameters to create testing instances of the class\n            Each dict are parameters to construct an \"interesting\" test instance, i.e.,\n            `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.\n            `create_test_instance` uses the first (or only) dictionary in `params`\n        \"\"\"\n        params1 = {\"columns\": None}\n        params2 = {\"columns\": [0, 2, 3]}\n        params3 = {\"columns\": [\"a\", \"foo\", \"bar\"], \"index_treatment\": \"keep\"}\n        params4 = {\"columns\": \"a\", \"index_treatment\": \"keep\"}\n\n        return [params1, params2, params3, params4]\n", "path": "sktime/transformations/series/subset.py"}], "after_files": [{"content": "\"\"\"Transformers for index and column subsetting.\"\"\"\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file).\n\n__author__ = [\"fkiraly\"]\n\nimport pandas as pd\n\nfrom sktime.transformations.base import BaseTransformer\n\n\nclass IndexSubset(BaseTransformer):\n    r\"\"\"Index subsetting transformer.\n\n    In transform, subsets `X` to the indices in `y.index`.\n    If `y` is None, returns `X` without subsetting.\n    numpy-based `X` are interpreted as having a RangeIndex starting at n,\n    where n is the number of numpy rows seen so far through `fit` and `update`.\n    Non-pandas types are interpreted as having index as after conversion to pandas,\n    via `datatypes.convert_to`, to the `\"pd.DataFrame\"` sktime type.\n\n    Parameters\n    ----------\n    index_treatment : str, optional, one of \"keep\" (default) or \"remove\"\n        determines which indices are kept in `Xt = transform(X, y)`\n        \"keep\" = all indices in y also appear in Xt. If not present in X, NA is filled.\n        \"remove\" = only indices that appear in both X and y are present in Xt.\n\n    Examples\n    --------\n    >>> from sktime.transformations.series.subset import IndexSubset\n    >>> from sktime.datasets import load_airline\n    >>> X = load_airline()[0:32]\n    >>> y = load_airline()[24:42]\n    >>> transformer = IndexSubset()\n    >>> X_subset = transformer.fit_transform(X=X, y=y)\n    \"\"\"\n\n    _tags = {\n        \"scitype:transform-input\": \"Series\",\n        # what is the scitype of X: Series, or Panel\n        \"scitype:transform-output\": \"Series\",\n        # what scitype is returned: Primitives, Series, Panel\n        \"scitype:instancewise\": True,  # is this an instance-wise transform?\n        \"X_inner_mtype\": [\"pd.DataFrame\", \"pd.Series\"],\n        \"y_inner_mtype\": [\"pd.DataFrame\", \"pd.Series\"],\n        \"transform-returns-same-time-index\": False,\n        \"fit_is_empty\": False,\n        \"univariate-only\": False,\n        \"capability:inverse_transform\": False,\n        \"remember_data\": True,  # remember all data seen as _X\n    }\n\n    def __init__(self, index_treatment=\"keep\"):\n        self.index_treatment = index_treatment\n        super().__init__()\n\n    def _transform(self, X, y=None):\n        \"\"\"Transform X and return a transformed version.\n\n        private _transform containing the core logic, called from transform\n\n        Parameters\n        ----------\n        X : pd.DataFrame or pd.Series\n            Data to be transformed\n        y : pd.DataFrame or pd.Series\n            Additional data, e.g., labels for transformation\n\n        Returns\n        -------\n        Xt : pd.DataFrame or pd.Series, same type as X\n            transformed version of X\n        \"\"\"\n        if y is None:\n            return X\n\n        X = self._X\n\n        index_treatment = self.index_treatment\n        ind_X_and_y = X.index.intersection(y.index)\n\n        if index_treatment == \"remove\":\n            Xt = X.loc[ind_X_and_y]\n        elif index_treatment == \"keep\":\n            Xt = X.loc[ind_X_and_y]\n            y_idx_frame = type(X)(index=y.index, dtype=\"float64\")\n            Xt = Xt.combine_first(y_idx_frame)\n        else:\n            raise ValueError(\n                f'index_treatment must be one of \"remove\", \"keep\", but found'\n                f' \"{index_treatment}\"'\n            )\n        return Xt\n\n    @classmethod\n    def get_test_params(cls, parameter_set=\"default\"):\n        \"\"\"Return testing parameter settings for the estimator.\n\n        Parameters\n        ----------\n        parameter_set : str, default=\"default\"\n            Name of the set of test parameters to return, for use in tests. If no\n            special parameters are defined for a value, will return `\"default\"` set.\n            There are currently no reserved values for transformers.\n\n        Returns\n        -------\n        params : dict or list of dict, default = {}\n            Parameters to create testing instances of the class\n            Each dict are parameters to construct an \"interesting\" test instance, i.e.,\n            `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.\n            `create_test_instance` uses the first (or only) dictionary in `params`\n        \"\"\"\n        params1 = {\"index_treatment\": \"remove\"}\n        params2 = {\"index_treatment\": \"keep\"}\n\n        return [params1, params2]\n\n\nclass ColumnSelect(BaseTransformer):\n    r\"\"\"Column selection transformer.\n\n    In transform, subsets `X` to `columns` provided as hyper-parameters.\n\n    Sequence of columns in `Xt=transform(X)` is as in `columns` hyper-parameter.\n    Caveat: this means that `transform` may change sequence of columns,\n        even if no columns are removed from `X` in `transform(X)`.\n\n    Parameters\n    ----------\n    columns : pandas compatible index or index coercible, optional, default = None\n        columns to which X in transform is to be subset\n    integer_treatment : str, optional, one of \"col\" (default) and \"coerce\"\n        determines how integer index columns are treated\n        \"col\" = subsets by column iloc index, even if columns is not in X.columns\n        \"coerce\" = coerces to integer pandas.Index and attempts to subset\n    index_treatment : str, optional, one of \"remove\" (default) or \"keep\"\n        determines which column are kept in `Xt = transform(X, y)`\n        \"remove\" = only indices that appear in both X and columns are present in Xt.\n        \"keep\" = all indices in columns appear in Xt. If not present in X, NA is filled.\n\n    Examples\n    --------\n    >>> from sktime.transformations.series.subset import ColumnSelect\n    >>> from sktime.datasets import load_longley\n    >>> X = load_longley()[1]\n    >>> transformer =  ColumnSelect(columns=[\"GNPDEFL\", \"POP\", \"FOO\"])\n    >>> X_subset = transformer.fit_transform(X=X)\n    \"\"\"\n\n    _tags = {\n        \"scitype:transform-input\": \"Series\",\n        # what is the scitype of X: Series, or Panel\n        \"scitype:transform-output\": \"Series\",\n        # what scitype is returned: Primitives, Series, Panel\n        \"scitype:instancewise\": True,  # is this an instance-wise transform?\n        \"X_inner_mtype\": [\"pd.DataFrame\", \"pd-multiindex\", \"pd_multiindex_hier\"],\n        \"y_inner_mtype\": \"None\",\n        \"transform-returns-same-time-index\": True,\n        \"fit_is_empty\": True,\n        \"univariate-only\": False,\n        \"capability:inverse_transform\": False,\n        \"skip-inverse-transform\": True,\n    }\n\n    def __init__(self, columns=None, integer_treatment=\"col\", index_treatment=\"remove\"):\n        self.columns = columns\n        self.integer_treatment = integer_treatment\n        self.index_treatment = index_treatment\n        super().__init__()\n\n    def _transform(self, X, y=None):\n        \"\"\"Transform X and return a transformed version.\n\n        private _transform containing the core logic, called from transform\n\n        Parameters\n        ----------\n        X : pd.DataFrame\n            Data to be transformed\n        y : Ignored argument for interface compatibility\n\n        Returns\n        -------\n        Xt : pd.DataFrame\n            transformed version of X\n        \"\"\"\n        columns = self.columns\n        integer_treatment = self.integer_treatment\n        index_treatment = self.index_treatment\n\n        if columns is None:\n            return X\n        if pd.api.types.is_scalar(columns):\n            columns = [columns]\n\n        columns = pd.Index(columns)\n\n        if integer_treatment == \"col\" and pd.api.types.is_integer_dtype(columns):\n            columns = [x for x in columns if x < len(X.columns)]\n            col_idx = X.columns[columns]\n            return X[col_idx]\n\n        in_cols = columns.isin(X.columns)\n        col_X_and_cols = columns[in_cols]\n\n        if index_treatment == \"remove\":\n            Xt = X[col_X_and_cols]\n        elif index_treatment == \"keep\":\n            Xt = X.reindex(columns=columns)\n        else:\n            raise ValueError(\n                f'index_treatment must be one of \"remove\", \"keep\", but found'\n                f' \"{index_treatment}\"'\n            )\n        return Xt\n\n    @classmethod\n    def get_test_params(cls, parameter_set=\"default\"):\n        \"\"\"Return testing parameter settings for the estimator.\n\n        Parameters\n        ----------\n        parameter_set : str, default=\"default\"\n            Name of the set of test parameters to return, for use in tests. If no\n            special parameters are defined for a value, will return `\"default\"` set.\n            There are currently no reserved values for transformers.\n\n        Returns\n        -------\n        params : dict or list of dict, default = {}\n            Parameters to create testing instances of the class\n            Each dict are parameters to construct an \"interesting\" test instance, i.e.,\n            `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.\n            `create_test_instance` uses the first (or only) dictionary in `params`\n        \"\"\"\n        params1 = {\"columns\": None}\n        params2 = {\"columns\": [0, 2, 3]}\n        params3 = {\"columns\": [\"a\", \"foo\", \"bar\"], \"index_treatment\": \"keep\"}\n        params4 = {\"columns\": \"a\", \"index_treatment\": \"keep\"}\n\n        return [params1, params2, params3, params4]\n", "path": "sktime/transformations/series/subset.py"}]}