File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 99import numpy as np
1010import pytest
1111
12+ from pandas ._config import using_string_dtype
13+
1214from pandas .compat .numpy import np_version_gte1p25
1315
1416import 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 ):
You can’t perform that action at this time.
0 commit comments