Error in `ColumnTransformer` when `x` is a pandas dataframe with `int` feature names

### Describe the bug

Hello, I've encountered an unexpected behavior when using `ColumnTransformer` with input `x` being a pandas dataframe with column names having int dtype. I give an example below, and an example use case can be found in soda-inria/tabicl#2.

The problem comes from the fact that `ColumnTransformer` interprets integers as column positions, while here the integers are the columns names. In my example below, `sklearn.compose.make_column_selector(dtype_include="number")(x)` returns `[0, 2]` which is interpreted as positions by `ColumnTransformer` while the admissible positions for `x` are in `[0, 1]`.

A workaround for the user is to always convert names to positions prior to giving them to `ColumnTransformer`, like:
```python
numeric_features = sklearn.compose.make_column_selector(dtype_include="number")(x)
numeric_positions = [x.columns.get_loc(col) for col in numeric_features]
```

However I'm wondering if this is something that should be taken care of on the `ColumnTransformer` side. Shouldn't `ColumnTransformer` always interpret given column names as names, even when they are integers?

### Steps/Code to Reproduce

```python
import numpy as np
import pandas as pd
import sklearn.compose
import sklearn.impute

rng = np.random.default_rng(0)
x = pd.DataFrame(rng.random((10, 3)))

x = x.iloc[:, [0, -1]]  # comment this out to make the test pass

transformer = sklearn.compose.ColumnTransformer(
    transformers=[
        (
            "continuous",
            sklearn.impute.SimpleImputer(),
            sklearn.compose.make_column_selector(dtype_include="number"),
        )
    ]
)

transformer.fit(x)
```

### Expected Results

No error is thrown.

### Actual Results

```
Traceback (most recent call last):
  File "python3.13/site-packages/sklearn/utils/_indexing.py", line 315, in _get_column_indices_for_bool_or_int
    idx = _safe_indexing(np.arange(n_columns), key)
  File "python3.13/site-packages/sklearn/utils/_indexing.py", line 270, in _safe_indexing
    return _array_indexing(X, indices, indices_dtype, axis=axis)
  File "python3.13/site-packages/sklearn/utils/_indexing.py", line 36, in _array_indexing
    return array[key, ...] if axis == 0 else array[:, key]
           ~~~~~^^^^^^^^^^
IndexError: index 2 is out of bounds for axis 0 with size 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "minimal.py", line 23, in <module>
    transformer.fit(x)
    ~~~~~~~~~~~~~~~^^^
  File "python3.13/site-packages/sklearn/compose/_column_transformer.py", line 947, in fit
    self.fit_transform(X, y=y, **params)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "python3.13/site-packages/sklearn/utils/_set_output.py", line 319, in wrapped
    data_to_wrap = f(self, X, *args, **kwargs)
  File "python3.13/site-packages/sklearn/base.py", line 1389, in wrapper
    return fit_method(estimator, *args, **kwargs)
  File "python3.13/site-packages/sklearn/compose/_column_transformer.py", line 993, in fit_transform
    self._validate_column_callables(X)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "python3.13/site-packages/sklearn/compose/_column_transformer.py", line 552, in _validate_column_callables
    transformer_to_input_indices[name] = _get_column_indices(X, columns)
                                         ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "python3.13/site-packages/sklearn/utils/_indexing.py", line 338, in _get_column_indices
    return _get_column_indices_for_bool_or_int(key, n_columns)
  File "python3.13/site-packages/sklearn/utils/_indexing.py", line 317, in _get_column_indices_for_bool_or_int
    raise ValueError(
        f"all features must be in [0, {n_columns - 1}] or [-{n_columns}, 0]"
    ) from e
ValueError: all features must be in [0, 1] or [-2, 0]
```

### Versions

```shell
System:
    python: 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:02:48) [Clang 18.1.8 ]
executable: miniforge3/envs/test/bin/python
   machine: macOS-15.3.1-arm64-arm-64bit-Mach-O

Python dependencies:
      sklearn: 1.6.1
          pip: 25.0.1
   setuptools: None
        numpy: 2.2.3
        scipy: 1.15.2
       Cython: None
       pandas: 2.2.3
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: openmp
   internal_api: openmp
    num_threads: 14
         prefix: libomp
       filepath: miniforge3/envs/test/lib/python3.13/site-packages/sklearn/.dylibs/libomp.dylib
        version: None
```

COMMENT:
I opened a draft, could you take a look?

Labels: Bug, Needs Investigation