-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: ExcelFile.parse #58247
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
Yes I agree we should deprecate And I'm not against deprecating |
+1 for deprecating |
Deprecating Excel file.parse means this feature is lost. What would be the alternative @rhshadrach ? |
@samukweku That is not lost if only |
pd.read_excel |
@asishm kindly explain how it is not lost? @rhshadrach wont the |
@samukweku the Albeit, when reading in multiple worksheets you are returned a dict of DataFrames. |
You can pass an |
As noted in the user guide, the usecase below can't be achieved without a re-read with the current api of
|
Thanks @asishm - that has me convinced that ExcelFile itself should stay. |
what is supposed to be done in this issue ?? Can you please clarify it properly. |
It seems to me we should either fix
ExcelFile.parse
or deprecate it entirely, and I lean toward the latter. pandas originally started out with justExcelFile
but now has the top-levelread_excel
. The signatures started the same, but nowread_excel
has gained and modified parameters that have not been added/changed inExcelFile.parse
. For example:ExcelFile.parse
lacks adtype
parameterExcelFile.parse
has a**kwds
argument that is passed on to pandas internals with no documentation on what can be included. Invalid arguments are just ignored (e.g. BUG: xl.parse index_col ignoring skiprows #50953)It appears to me that
pd.ExcelFile(...).parse(...)
offers no advantage overpd.read_excel(pd.ExcelFile(...))
, and so rather than fixingparse
we can deprecate it and make it internal.Edit: I no longer think deprecating
ExcelFile
entirely as mentioned below is a good option. See #58247 (comment).Another option is to deprecate
ExcelFile
entirely. The one thingExcelFile
still provides that isn't available elsewhere is to get the underlyingbook
orsheet_names
without reading the entire file.One can somewhat work around this by using
nrows
, but it's clunky.The text was updated successfully, but these errors were encountered: