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 = ...,`