Enable feature selectors to pass pandas DataFrame to estimator

### Describe the workflow you want to enable

When running SequentialFeatureSelector (or, presumably, other feature selection methods) with a pandas DataFrame input, the reduced-feature input is passed to the estimator as a numpy array. This seems inconsistent with the other transformers that successfully maintain the pandas indices.

My actual use case is the following: Select the best k features that complement a set of fixed features. I was going to implement it like this: (happy to take suggestions for alternatives).

```python
import pandas as pd
import numpy as np
import sklearn
from sklearn.feature_selection import SequentialFeatureSelector
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import FunctionTransformer
from sklearn.linear_model import LinearRegression
from sklearn.pipeline import Pipeline

X=pd.DataFrame(np.random.rand(10,3))
y=pd.Series(np.random.rand(10))

fixed_features=pd.DataFrame(np.random.rand(X.shape[0],2))
appender= FunctionTransformer(lambda X:pd.concat([X,fixed_features.reindex(X.index)],axis=1))
X.shape,appender.fit_transform(X).shape
```

    ((10, 3), (10, 5))


```python
LR_with_fixed=LR=Pipeline(steps=[
    ('append',appender),
    ('LR',LinearRegression())
])
SFS_with_fixed = SequentialFeatureSelector(
    LR_with_fixed,n_features_to_select=1, direction="forward"
)
_=SFS_with_fixed.fit(X,y)
```

    ValueError: 
    All the 5 fits failed.
    .....
      File "/tmp/ipykernel_275/897617596.py", line 2, in <lambda>
        appender= FunctionTransformer(lambda X:pd.concat([X,fixed_features.reindex(X.index)],axis=1))
    AttributeError: 'numpy.ndarray' object has no attribute 'index'



### Describe your proposed solution

I believe that it should be possible to pass the reduced matrix to the estimator as a pandas DataFrame, and this would be consistent with the way other Transformers work currently.

### Describe alternatives you've considered, if relevant

An alternative that would suffice for my particular use case is to directly pass a set of fixed features as a parameter to the feature selector.

### Additional context

_No response_

COMMENT:
> `SequentialFeatureSelector` will call `_validate_data` which will convert the dataframe into a NumPy array. Then, it will make the algorithmic part and thus pass a piece of the NumPy array to the underlying estimator (i.e. your LR pipeline).

I think it would be good to take a moment to think about a general strategy for what should happen in situations like this. There have been a few issues (e.g. https://github.com/scikit-learn/scikit-learn/issues/25499 https://github.com/scikit-learn/scikit-learn/issues/25365) where something similar happened. Should the "wrapping" estimator perform input conversion? How should it behave when `transform_output="pandas"` is configured? etc

In the particular case of this issue, I could see the argument that what is happening is "the right thing". It follows the "rule" of scikit-learn estimators will convert input to a numpy array (at the first point of contact). I can also see the argument that it is annoying that it works this way.

This means I think we should try and come up with a simple rule, so that it is easy to predict what will happen, even if you dislike what happens, to guide the discussion and code changes.

Labels: Bug