Skip to content

Commit ea3eccd

Browse files
committed
BUG: pandas int extension dtypes has no attribute byteorder (pandas-dev#57173)
* support nullable integers in from_dataframe * gh issue number * use BaseMaskedDtype * only skip if int8[pyarrow] (cherry picked from commit 0fd7176)
1 parent bdc79c1 commit ea3eccd

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

pandas/tests/interchange/test_impl.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -380,30 +380,6 @@ def test_large_string():
380380
tm.assert_frame_equal(result, expected)
381381

382382

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-
407383
@pytest.mark.parametrize(
408384
"dtype", ["Int8", pytest.param("Int8[pyarrow]", marks=td.skip_if_no("pyarrow"))]
409385
)

0 commit comments

Comments
 (0)