-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Conversation
There was a problem hiding this 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
actual = pd.read_excel( | ||
basename + read_ext, sheet_name="Sheet1", convert_float=False | ||
) | ||
# raise_on_extra_warnings because xlrd raises a PendingDeprecationWarning |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @mroeschke
# Conflicts: # doc/source/whatsnew/v2.0.0.rst
Thanks @phofl |
…_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
I'll take care of the mangle dup cols within csv in a follow up when the other csv deprecations are merged
#41176 #34418