Repository: pandas-dev/pandas
Pull request #60974 (2025-02-20 12:06:06)

BUG: fix error message for multiindex.fillna
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

It's very surprising to me that there's 3 different tests which explicitly check this error message, yet the discrepancy was never noticed (unless I'm missing something here, which is definitely a possibility)


Patch:
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index bacca20780..39f52bb3ed 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -4,9 +4,6 @@
 # ci
 ci/                               @mroeschke
 
-# web
-web/                              @datapythonista
-
 # docs
 doc/cheatsheet                    @Dr-Irv
 doc/source/development            @noatamir
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst
index 090be6dc25..999c2ebf32 100644
--- a/doc/source/whatsnew/v3.0.0.rst
+++ b/doc/source/whatsnew/v3.0.0.rst
@@ -817,6 +817,7 @@ Other
 - Bug in :meth:`DataFrame.transform` that was returning the wrong order unless the index was monotonically increasing. (:issue:`57069`)
 - Bug in :meth:`DataFrame.where` where using a non-bool type array in the function would return a ``ValueError`` instead of a ``TypeError`` (:issue:`56330`)
 - Bug in :meth:`Index.sort_values` when passing a key function that turns values into tuples, e.g. ``key=natsort.natsort_key``, would raise ``TypeError`` (:issue:`56081`)
+- Bug in :meth:`MultiIndex.fillna` error message was referring to ``isna`` instead of ``fillna`` (:issue:`60974`)
 - Bug in :meth:`Series.diff` allowing non-integer values for the ``periods`` argument. (:issue:`56607`)
 - Bug in :meth:`Series.dt` methods in :class:`ArrowDtype` that were returning incorrect values. (:issue:`57355`)
 - Bug in :meth:`Series.isin` raising ``TypeError`` when series is large (>10**6) and ``values`` contains NA (:issue:`60678`)
diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py
index dc48cd1ed9..1cb984b538 100644
--- a/pandas/core/indexes/multi.py
+++ b/pandas/core/indexes/multi.py
@@ -1760,7 +1760,7 @@ class MultiIndex(Index):
         """
         fillna is not implemented for MultiIndex
         """
-        raise NotImplementedError("isna is not defined for MultiIndex")
+        raise NotImplementedError("fillna is not defined for MultiIndex")
 
     @doc(Index.dropna)
     def dropna(self, how: AnyAll = "any") -> MultiIndex:
diff --git a/web/pandas/about/team.md b/web/pandas/about/team.md
index b66e134fa5..7a19fd7af6 100644
--- a/web/pandas/about/team.md
+++ b/web/pandas/about/team.md
@@ -41,8 +41,6 @@ If you want to support pandas development, you can find information in the [dona
 
 ## Governance
 
-Wes McKinney is the Benevolent Dictator for Life (BDFL).
-
 The project governance is available in the [project governance page]({{ base_url }}about/governance.html).
 
 ## Workgroups
diff --git a/web/pandas/config.yml b/web/pandas/config.yml
index a49aadd452..41ba581852 100644
--- a/web/pandas/config.yml
+++ b/web/pandas/config.yml
@@ -132,8 +132,7 @@ workgroups:
     contact: infrastructure@pandas.pydata.org
     responsibilities: "Keep the pandas infrastructure up and working. In particular the servers for the website, benchmarks, CI and others needed."
     members:
-    - Marc Garcia
-    - Matthew Roeschke
+    - William Ayd
     - Thomas Li
   communications:
     name: Communications
@@ -141,7 +140,6 @@ workgroups:
     responsibilities: "Share relevant information with the broader community, mainly via our social networks, as well as being the main point of contact between NumFOCUS and the core team."
     members:
     - Marco Gorelli
-    - Marc Garcia
 sponsors:
   active:
   - name: "NumFOCUS"


Test patch:
diff --git a/pandas/tests/base/test_fillna.py b/pandas/tests/base/test_fillna.py
index 7300d30133..8c56bcc169 100644
--- a/pandas/tests/base/test_fillna.py
+++ b/pandas/tests/base/test_fillna.py
@@ -16,7 +16,7 @@ def test_fillna(index_or_series_obj):
     obj = index_or_series_obj
 
     if isinstance(obj, MultiIndex):
-        msg = "isna is not defined for MultiIndex"
+        msg = "fillna is not defined for MultiIndex"
         with pytest.raises(NotImplementedError, match=msg):
             obj.fillna(0)
         return
diff --git a/pandas/tests/indexes/multi/test_missing.py b/pandas/tests/indexes/multi/test_missing.py
index 14ffc42fb4..41cfa093ae 100644
--- a/pandas/tests/indexes/multi/test_missing.py
+++ b/pandas/tests/indexes/multi/test_missing.py
@@ -8,7 +8,7 @@ import pandas._testing as tm
 
 def test_fillna(idx):
     # GH 11343
-    msg = "isna is not defined for MultiIndex"
+    msg = "fillna is not defined for MultiIndex"
     with pytest.raises(NotImplementedError, match=msg):
         idx.fillna(idx[0])
 
diff --git a/pandas/tests/indexes/test_old_base.py b/pandas/tests/indexes/test_old_base.py
index 49609d28ca..5f36b8c3f5 100644
--- a/pandas/tests/indexes/test_old_base.py
+++ b/pandas/tests/indexes/test_old_base.py
@@ -597,7 +597,7 @@ class TestBase:
             pytest.skip(f"Not relevant for Index with {index.dtype}")
         elif isinstance(index, MultiIndex):
             idx = index.copy(deep=True)
-            msg = "isna is not defined for MultiIndex"
+            msg = "fillna is not defined for MultiIndex"
             with pytest.raises(NotImplementedError, match=msg):
                 idx.fillna(idx[0])
         else: