Skip to content

Commit 82107f6

Browse files
authored
Fix pd.read_excel (#33)
* Fix pd.read_excel * add a test * fix merge, cr feedback * actually fix merge Co-authored-by: hauntsaninja <>
1 parent 7a5d7a8 commit 82107f6

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

pandas-stubs/io/excel/__init__.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from pandas.io.excel._base import (
2+
ExcelFile as ExcelFile,
3+
ExcelWriter as ExcelWriter,
4+
read_excel as read_excel,
5+
)

tests/test_frame.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# flake8: noqa: F841
2-
from datetime import (
3-
date,
4-
datetime,
5-
)
2+
from datetime import date
63
import io
74
from pathlib import Path
85
import tempfile
96
from typing import (
107
Any,
8+
Dict,
119
Iterable,
1210
List,
1311
Tuple,
@@ -1012,6 +1010,15 @@ def test_frame_getitem_isin() -> None:
10121010
assert_type(df[df.index.isin([1, 3, 5])], "pd.DataFrame")
10131011

10141012

1013+
def test_read_excel() -> None:
1014+
pytest.skip()
1015+
1016+
# https://github.com/pandas-dev/pandas-stubs/pull/33
1017+
df11: pd.DataFrame = pd.read_excel("foo")
1018+
df12: pd.DataFrame = pd.read_excel("foo", sheet_name="sheet")
1019+
df13: Dict[Union[int, str], pd.DataFrame] = pd.read_excel("foo", sheet_name=["sheet"])
1020+
1021+
10151022
def test_join() -> None:
10161023
float_frame = pd.DataFrame(getSeriesData())
10171024
# GH 29

0 commit comments

Comments
 (0)