diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 4d166e954bfbb..a5520d9e5ca2f 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -636,7 +636,7 @@ Reshaping ^^^^^^^^^ - Bug in :func:`concat` coercing to ``object`` dtype when one column has ``pa.null()`` dtype (:issue:`53702`) - Bug in :func:`crosstab` when ``dropna=False`` would not keep ``np.nan`` in the result (:issue:`10772`) -- Bug in :func:`melt` where the ``variable`` column would lose extension dtypes (:issue:`?`) +- Bug in :func:`melt` where the ``variable`` column would lose extension dtypes (:issue:`54297`) - Bug in :func:`merge_asof` raising ``KeyError`` for extension dtypes (:issue:`52904`) - Bug in :func:`merge_asof` raising ``ValueError`` for data backed by read-only ndarrays (:issue:`53513`) - Bug in :func:`merge_asof` with ``left_index=True`` or ``right_index=True`` with mismatched index dtypes giving incorrect results in some cases instead of raising ``MergeError`` (:issue:`53870`) diff --git a/pandas/tests/reshape/test_melt.py b/pandas/tests/reshape/test_melt.py index 19895f419691a..bf03aa56a1da2 100644 --- a/pandas/tests/reshape/test_melt.py +++ b/pandas/tests/reshape/test_melt.py @@ -438,6 +438,7 @@ def test_melt_ea_dtype(self, dtype): tm.assert_frame_equal(result, expected) def test_melt_ea_columns(self): + # GH 54297 df = DataFrame( { "A": {0: "a", 1: "b", 2: "c"},