@@ -380,30 +380,6 @@ def test_large_string():
380
380
tm .assert_frame_equal (result , expected )
381
381
382
382
383
- def test_non_str_names ():
384
- # https://github.com/pandas-dev/pandas/issues/56701
385
- df = pd .Series ([1 , 2 , 3 ], name = 0 ).to_frame ()
386
- names = df .__dataframe__ ().column_names ()
387
- assert names == ["0" ]
388
-
389
-
390
- def test_non_str_names_w_duplicates ():
391
- # https://github.com/pandas-dev/pandas/issues/56701
392
- df = pd .DataFrame ({"0" : [1 , 2 , 3 ], 0 : [4 , 5 , 6 ]})
393
- dfi = df .__dataframe__ ()
394
- with pytest .raises (
395
- TypeError ,
396
- match = (
397
- "Expected a Series, got a DataFrame. This likely happened because you "
398
- "called __dataframe__ on a DataFrame which, after converting column "
399
- r"names to string, resulted in duplicated names: Index\(\['0', '0'\], "
400
- r"dtype='object'\). Please rename these columns before using the "
401
- "interchange protocol."
402
- ),
403
- ):
404
- pd .api .interchange .from_dataframe (dfi , allow_copy = False )
405
-
406
-
407
383
@pytest .mark .parametrize (
408
384
"dtype" , ["Int8" , pytest .param ("Int8[pyarrow]" , marks = td .skip_if_no ("pyarrow" ))]
409
385
)
0 commit comments