Pandas version checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pandas.
-
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
data = pd.read_excel('sheet_path', 'sheet_name', dtype={'col1':str})
Issue Description
When I try to execute the code I receive an error: TypeError: read_excel() got an unexpected keyword argument 'dtype'
Expected Behavior
I expect that this keyword, as explained in the documentation, permit to define the datatype of a column that now is read as numeric integer but I need to read it as string.
Installed Versions
Comment From: phofl
Hi, thanks for your report.This works for me on 1.5.3. Can you check the function signature in your installation and provide the file?
Comment From: marcomameli1992
Hi, how can I check the function signature?
I have tested my code with macos and windows, both with 1.5.3 and the result is the same.
Thanks
update. I hope that is what you ask:
Comment From: phofl
Yeah, not sure what's wrong on your side. Can you try reinstall?
Comment From: marcomameli1992
I try to remove the pack, clean the cache and install it again bu the problem persist.
Comment From: marcomameli1992
Dear @phofl, do you have any suggestions to solve the problem?
Edit: I try to create a new environment with conda and I have installed pandas library with conda but the problem with dtype is not solved
Comment From: phofl
I'd suggest asking on stack overflow. Not sure what's wrong on your side. We have a bunch of tests covering this and this isn't broken on my machine either. So seems to me as this is something with your environment
Comment From: marcomameli1992
I ask on stack overflow. Here the link: stackoverflow
I hope that someone has a solution to this problem.
thankyou
Comment From: phofl
closing for now