-
-
Notifications
You must be signed in to change notification settings - Fork 141
read_excel/index_col: string not accepted #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looking internally at the pandas source, I think the docs may be wrong. Inside of pandas, If you can produce an example where Conversely, if a string doesn't work as the argument, then an issue should be raised in the pandas repo. Can you provide an appropriate test (either way)? |
from pandas import read_excel
print(read_excel("Book1.xlsx"))
print(read_excel("Book1.xlsx", index_col="bar")) Output:
|
Thanks for the example. I created an issue for the pandas source to fix the typing there. In the meantime, a fix here would be welcome, along with appropriate tests. |
Co-authored-by: Laurent Mutricy <[email protected]>
Either the documentation or the type hint for index_col in pandas.read_excel is wrong.
The documentation says a string may be used.
The type hint forbids that
Documentation:
index_col int, str, list of int, default None
Type hints:
index_col: int | Sequence[int] | None = ...,
The text was updated successfully, but these errors were encountered: