Skip to content

DEP: Enforce deprecation of squeeze in read_excel #51481

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

Merged
merged 3 commits into from
Feb 19, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Feb 18, 2023

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

looks like we missed a deprecation.

cc @MarcoGorelli for a quick look?

@phofl phofl added this to the 2.0 milestone Feb 18, 2023
@phofl phofl added IO Excel read_excel, to_excel Deprecate Functionality to remove in pandas labels Feb 18, 2023
Comment on lines 900 to 888
if not squeeze or isinstance(output[asheetname], DataFrame):
if isinstance(output[asheetname], DataFrame):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for my understanding - previously, isinstance(output[asheetname], DataFrame) would only have been evaluated if squeeze was True. Now that that option is False always (because squeeze has been removed), then can this whole if statement be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, thx. Yes we always get back a DataFrame, so can remove

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks @phofl

@phofl phofl merged commit 592e34f into pandas-dev:main Feb 19, 2023
@phofl phofl deleted the dep_squeeze branch February 19, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants