Skip to content

Commit d005169

Browse files
committed
Reverts
1 parent 6c988aa commit d005169

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/tests/reshape/test_pivot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import numpy as np
1010
import pytest
1111

12+
from pandas._config import using_string_dtype
13+
1214
from pandas.compat.numpy import np_version_gte1p25
1315

1416
import pandas as pd
@@ -2668,10 +2670,10 @@ def test_pivot_columns_not_given(self):
26682670

26692671
# this still fails because columns=None gets passed down to unstack as level=None
26702672
# while at that point None was converted to NaN
2671-
# @pytest.mark.xfail(
2672-
# using_string_dtype(), reason="TODO(infer_string) None is cast to NaN"
2673-
# )
2674-
def test_pivot_columns_is_none(self, using_infer_string):
2673+
@pytest.mark.xfail(
2674+
using_string_dtype(), reason="TODO(infer_string) None is cast to NaN"
2675+
)
2676+
def test_pivot_columns_is_none(self):
26752677
# GH#48293
26762678
df = DataFrame({None: [1], "b": 2, "c": 3})
26772679
result = df.pivot(columns=None)
@@ -2684,8 +2686,6 @@ def test_pivot_columns_is_none(self, using_infer_string):
26842686

26852687
result = df.pivot(columns=None, index="b", values="c")
26862688
expected = DataFrame({1: 3}, index=Index([2], name="b"))
2687-
if using_infer_string:
2688-
expected.columns.name = np.nan
26892689
tm.assert_frame_equal(result, expected)
26902690

26912691
def test_pivot_index_is_none(self, using_infer_string):

0 commit comments

Comments
 (0)