Closed
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)