-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
IO Excelread_excel, to_excelread_excel, to_excelTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checkinggood first issue
Milestone
Description
Inside the pandas source, the index_col
argument for read_excel()
is typed as:
index_col: int | Sequence[int] | None = ...,
But the docs say that a string is accepted, as shown in the example below.
from pandas import read_excel
print(read_excel("Book1.xlsx"))
print(read_excel("Book1.xlsx", index_col="bar"))
Output:
foo bar
0 1 2
1 3 4
foo
bar
2 1
4 3
Originally posted by @clo-vis in pandas-dev/pandas-stubs#809 (comment)
Metadata
Metadata
Assignees
Labels
IO Excelread_excel, to_excelread_excel, to_excelTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checkinggood first issue