Skip to content
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

DEP: Enforce deprecation of mangle_dup cols and convert_float in read_excel #49089

Merged
merged 11 commits into from
Oct 21, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Oct 14, 2022

I'll take care of the mangle dup cols within csv in a follow up when the other csv deprecations are merged

#41176 #34418

@phofl phofl added IO Excel read_excel, to_excel Deprecate Functionality to remove in pandas labels Oct 14, 2022
@phofl phofl added this to the 2.0 milestone Oct 14, 2022
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

nice work - a couple comments

pandas/io/excel/_base.py Show resolved Hide resolved
actual = pd.read_excel(
basename + read_ext, sheet_name="Sheet1", convert_float=False
)
# raise_on_extra_warnings because xlrd raises a PendingDeprecationWarning
Copy link
Member

Choose a reason for hiding this comment

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

Tangential to this PR but assuming we ultimately will be removing xlrd as well

#35029

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep but did not want to mix too much stuff

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the raise_on_extra_warnings comment isn't needed anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@@ -1275,12 +1247,6 @@ def test_read_excel_squeeze(self, read_ext):
expected = Series([1, 2, 3], name="a")
tm.assert_series_equal(actual, expected)

def test_deprecated_kwargs(self, read_ext):
with tm.assert_produces_warning(FutureWarning, raise_on_extra_warnings=False):
Copy link
Member

Choose a reason for hiding this comment

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

Could you turn this test into checking that non-keyword arguments here raise?

Copy link
Member

Choose a reason for hiding this comment

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

Nice idea - wondering if there's a comprehensive way we should be testing for that (maybe part of test_api) as we do this with more functions

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

Nice idea - wondering if there's a comprehensive way we should be testing for that (maybe part of test_api) as we do this with more functions

Yeah it would be cool to have a test that nails down signature definitions and even alignment between DataFrame/Series methods

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm @mroeschke

@mroeschke mroeschke merged commit bb858da into pandas-dev:main Oct 21, 2022
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the dep_excel branch October 23, 2022 17:40
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…_excel (pandas-dev#49089)

* DEP: Enforce deprecation of mangle_dup cols and convert_float in read_excel

* Remove test

* Switch to int

* Fix

* Add whatsnew

* Fix whatsnew

* Adress review
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.

None yet

3 participants