Skip to content

Commit b1cb637

Browse files
authored
Add interchange to pandas-stubs/api/__init__.pyi (#713)
* Add interchange to pandas-stubs/api/__init__.pyi * Add test
1 parent d73f5fd commit b1cb637

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pandas-stubs/api/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from pandas.api import (
22
extensions as extensions,
33
indexers as indexers,
4+
interchange as interchange,
45
types as types,
56
)

tests/test_api_types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,11 @@ def check_ext_dtype(etype: Type[ExtensionDtype]):
470470
check_ext_dtype(pd.SparseDtype)
471471
check_ext_dtype(pd.Float32Dtype)
472472
check_ext_dtype(pd.Float64Dtype)
473+
474+
475+
def test_from_dataframe() -> None:
476+
# GH 712
477+
check(
478+
assert_type(pd.api.interchange.from_dataframe(dframe), pd.DataFrame),
479+
pd.DataFrame,
480+
)

0 commit comments

Comments
 (0)