@@ -135,12 +135,6 @@ def test_frame_non_unique_index_raises(self, orient):
135135 ],
136136 )
137137 def test_frame_non_unique_columns (self , orient , data , request ):
138- if isinstance (data [0 ][0 ], Timestamp ) and orient == "split" :
139- mark = pytest .mark .xfail (
140- reason = "GH#55827 non-nanosecond dt64 fails to round-trip"
141- )
142- request .applymarker (mark )
143-
144138 df = DataFrame (data , index = [1 , 2 ], columns = ["x" , "x" ])
145139
146140 expected_warning = None
@@ -162,10 +156,14 @@ def test_frame_non_unique_columns(self, orient, data, request):
162156 # in milliseconds; these are internally stored in nanosecond,
163157 # so divide to get where we need
164158 # TODO: a to_epoch method would also solve; see GH 14772
165- expected .isetitem (0 , expected .iloc [:, 0 ].astype (np .int64 ) // 1000000 )
159+ dta = expected .iloc [:, 0 ]._values
160+ dta = dta .as_unit ("ns" ) # GH#55827
161+ expected .isetitem (0 , dta .astype (np .int64 ) // 1_000_000 )
166162 elif orient == "split" :
167163 expected = df
168164 expected .columns = ["x" , "x.1" ]
165+ if expected ["x" ].dtype .kind == "M" :
166+ expected ["x" ] = expected ["x" ].astype ("M8[ns]" ) # GH#55827
169167
170168 tm .assert_frame_equal (result , expected )
171169
0 commit comments