Error handling pandas missing values in SimpleImputer

### Describe the bug

I recently installed the stable release of scikit-learn v1.7.2, and noticed that when passing missing_values=pd.NA to the SimpleImputer object, it throws the following error when trying to inspect the object:

TypeError: boolean value of NA is ambiguous

This behavior did not occur in earlier versions such as v1.4.2, where using pd.NA was accepted without issues. I’d like to know if this change is intentional, if there’s a recommended workaround for using pd.NA, or if this is something already being considered for future releases.
Looking forward to your insights or any updates regarding this issue.

### Steps/Code to Reproduce

```py
import pandas as pd
from sklearn.impute import SimpleImputer

# Generar un DataFrame aleatorio con valores faltantes
data = {
    'Categoria': ['A', 'B', pd.NA, 'C', pd.NA],
    'Producto': ['X', pd.NA, 'Y', pd.NA, 'Z']
}
df_random = pd.DataFrame(data)

print("Datos originales con valores faltantes:")
print(df_random)

# Aplicar SimpleImputer para rellenar valores faltantes con 'UNKNOWN'
imputer = SimpleImputer(strategy='constant', fill_value='UNKNOWN', missing_values=pd.NA)
df_imputed = pd.DataFrame(imputer.fit_transform(df_random), columns=df_random.columns)

print("\nDatos después de aplicar SimpleImputer:")
print(df_imputed)

imputer  # <-- crashes
```

### Expected Results

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
File c:\Users\dca\Documentos\ml\.venv\Lib\site-packages\IPython\core\formatters.py:1036, in MimeBundleFormatter.__call__(self, obj, include, exclude)
   1033     method = get_real_method(obj, self.print_method)
   1035     if method is not None:
-> [1036](file:///C:/Users/dca/Documentos/ml/.venv/Lib/site-packages/IPython/core/formatters.py:1036)         return method(include=include, exclude=exclude)
   1037     return None
   1038 else:

File c:\Users\dca\Documentos\ml\.venv\Lib\site-packages\sklearn\utils\_repr_html\base.py:151, in ReprHTMLMixin._repr_mimebundle_(self, **kwargs)
    149 output = {"text/plain": repr(self)}
    150 if get_config()["display"] == "diagram":
--> [151](file:///C:/Users/dca/Documentos/ml/.venv/Lib/site-packages/sklearn/utils/_repr_html/base.py:151)     output["text/html"] = self._html_repr()
    152 return output

File c:\Users\dca\Documentos\ml\.venv\Lib\site-packages\sklearn\utils\_repr_html\estimator.py:480, in estimator_html_repr(estimator)
    469 html_template = (
    470     f"<style>{style_with_id}</style>"
    471     f"<body>"
   (...)    476     '<div class="sk-container" hidden>'
    477 )
    479 out.write(html_template)
--> [480](file:///C:/Users/dca/Documentos/ml/.venv/Lib/site-packages/sklearn/utils/_repr_html/estimator.py:480) _write_estimator_html(
    481     out,
    482     estimator,
...
   2594     return True

File pandas/_libs/missing.pyx:392, in pandas._libs.missing.NAType.__bool__()

TypeError: boolean value of NA is ambiguous

### Actual Results

File pandas/_libs/missing.pyx:392, in pandas._libs.missing.NAType.__bool__()

TypeError: boolean value of NA is ambiguous

### Versions

```shell
System:
    python: 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
executable: c:\Users\dca\Documentos\ml\.venv\Scripts\python.exe
   machine: Windows-10-10.0.26100-SP0

Python dependencies:
      sklearn: 1.7.2
          pip: None
   setuptools: 80.9.0
        numpy: 2.3.2
        scipy: 1.16.1
       Cython: None
       pandas: 2.3.2
   matplotlib: 3.10.6
       joblib: 1.5.2
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libscipy_openblas
       filepath: C:\Users\dca\Documentos\ml\.venv\Lib\site-packages\numpy.libs\libscipy_openblas64_-860d95b1c38e637ce4509f5fa24fbf2a.dll
        version: 0.3.30
threading_layer: pthreads
   architecture: Haswell

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: vcomp
       filepath: C:\Users\dca\Documentos\ml\.venv\Lib\site-packages\sklearn\.libs\vcomp140.dll
        version: None

       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libscipy_openblas
       filepath: C:\Users\dca\Documentos\ml\.venv\Lib\site-packages\scipy.libs\libscipy_openblas-6b2103f2ae4d8547998b5d188e9801fb.dll
        version: 0.3.28
threading_layer: pthreads
   architecture: Haswell
```

COMMENT:
> I did an environment with 1.7.2, and it doesn't crash for me. With the provided example I get:
> 
> ```
> Datos originales con valores faltantes:
>   Categoria Producto
> 0         A        X
> 1         B     <NA>
> 2      <NA>        Y
> 3         C     <NA>
> 4      <NA>        Z
> 
> Datos después de aplicar SimpleImputer:
>   Categoria Producto
> 0         A        X
> 1         B  UNKNOWN
> 2   UNKNOWN        Y
> 3         C  UNKNOWN
> 4   UNKNOWN        Z
> SimpleImputer(fill_value='UNKNOWN', missing_values=<NA>, strategy='constant')
> ```
> 
> But I have newer versions of `python`, `pandas` and `numpy`. Older `scipy`, and I'm on a mac:
> 
> ```
> System:
>     python: 3.13.6 (v3.13.6:4e665351082, Aug  6 2025, 11:22:35) [Clang 16.0.0 (clang-1600.0.26.6)]
> executable: /Users/dealeon/projects/test/sklearn-env/bin/python3
>    machine: macOS-15.6.1-arm64-arm-64bit-Mach-O
> 
> Python dependencies:
>       sklearn: 1.7.2
>           pip: 25.2
>    setuptools: None
>         numpy: 2.3.3
>         scipy: 1.16.2
>        Cython: None
>        pandas: 2.3.3
>    matplotlib: None
>        joblib: 1.5.2
> threadpoolctl: 3.6.0
> 
> Built with OpenMP: True
> 
> threadpoolctl info:
>        user_api: openmp
>    internal_api: openmp
>     num_threads: 8
>          prefix: libomp
>        filepath: /Users/dealeon/projects/test/sklearn-env/lib/python3.13/site-packages/sklearn/.dylibs/libomp.dylib
>         version: None
> ```
> 
> Maybe try to upgrade your versions [@castillouparela](https://github.com/castillouparela)? I did a complete new environment for this test. https://scikit-learn.org/stable/install.html and everything went smoothly.
> 
> Pinging [@jeremiedbb](https://github.com/jeremiedbb) in case I should keep investigating or missing something.

The funny thing is that the null imputation method works without problems, but when I try to visualize it in HTML it does not allow me

Labels: Bug