-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: squeeze argument in read_csv/read_table/read_excel #43427
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
Conversation
lithomas1
commented
Sep 6, 2021
- closes DEPR: squeeze() argument in read_csv/read_table #43242
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
Wanted some feedback on the new approach to verify stacklevel in the tests. Also, I'm not sure how to deprecate this for |
th.assert_produces_warning should check the stacklevel and raise if is not correct. This should be enough I think? |
ok to tackle in a followup |
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
Co-authored-by: gfyoung <[email protected]>
thanks @lithomas1 |
@phofl Are there other comments that I should address in a follow-up? The current approach is using tm.assert_produces_warning in the conftest since thats where the warnings should be raised. If OK, I will make another PR updating all the other tests, and changing their stacklevels if necessary. |
…("columns")` in `pd.read_csv` (#2693) Replace deprecated argument `squeeze` with the method `.squeeze("columns")` in `pd.read_csv`. This argument is deprecated since version `1.4.0` of `pandas` (see https://pandas.pydata.org/docs/whatsnew/v1.4.0.html and pandas-dev/pandas#43427).
… from `read_csv` & enabling more tests ### What changes were proposed in this pull request? This PR proposes to remove `squeeze` parameter from `read_csv` to follow the behavior of latest pandas. See pandas-dev/pandas#40413 and pandas-dev/pandas#43427 for detail. This PR also enables more tests for pandas 2.0.0 and above. ### Why are the changes needed? To follow the behavior of latest pandas, and increase the test coverage. ### Does this PR introduce _any_ user-facing change? `squeeze` will be no longer available from `read_csv`. Otherwise, it's test-only. ### How was this patch tested? Enabling & updating the existing tests. Closes #42551 from itholic/pandas_remaining_tests. Authored-by: itholic <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
… from `read_csv` & enabling more tests ### What changes were proposed in this pull request? This PR proposes to remove `squeeze` parameter from `read_csv` to follow the behavior of latest pandas. See pandas-dev/pandas#40413 and pandas-dev/pandas#43427 for detail. This PR also enables more tests for pandas 2.0.0 and above. ### Why are the changes needed? To follow the behavior of latest pandas, and increase the test coverage. ### Does this PR introduce _any_ user-facing change? `squeeze` will be no longer available from `read_csv`. Otherwise, it's test-only. ### How was this patch tested? Enabling & updating the existing tests. Closes apache#42551 from itholic/pandas_remaining_tests. Authored-by: itholic <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
… from `read_csv` & enabling more tests ### What changes were proposed in this pull request? This PR proposes to remove `squeeze` parameter from `read_csv` to follow the behavior of latest pandas. See pandas-dev/pandas#40413 and pandas-dev/pandas#43427 for detail. This PR also enables more tests for pandas 2.0.0 and above. ### Why are the changes needed? To follow the behavior of latest pandas, and increase the test coverage. ### Does this PR introduce _any_ user-facing change? `squeeze` will be no longer available from `read_csv`. Otherwise, it's test-only. ### How was this patch tested? Enabling & updating the existing tests. Closes apache#42551 from itholic/pandas_remaining_tests. Authored-by: itholic <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>