-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: .squeeze accepts axis parameter #15335
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
@kernc Is there an issue for this? |
Thanks. Now it is: #15339. |
51cc482
to
cc018c9
Compare
pandas/core/generic.py
Outdated
|
||
Parameters | ||
---------- | ||
axis : None or int or tuple of ints, optional |
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.
so you don't need virtually any of this validation, simply
axis = self._get_axis_number(axis)
, this can only accept a single axis (or None by-default)
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.
Something like the pushed change?
1f91721
to
44d3c54
Compare
Codecov Report@@ Coverage Diff @@
## master #15335 +/- ##
==========================================
+ Coverage 86.32% 86.32% +<.01%
==========================================
Files 141 141
Lines 51165 51163 -2
==========================================
- Hits 44169 44168 -1
+ Misses 6996 6995 -1
Continue to review full report at Codecov.
|
thanks! |
Parameters | ||
---------- | ||
axis : None or int, optional | ||
The axis to squeeze if 1-sized. |
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.
Can you explain what the default is (None -> squeeze all 1-sized dimensions)
Added a 2 comments on the documentation (see above and also the comment on the merged commit: 87c2c2a#commitcomment-20800784). |
closes pandas-dev#15339 Author: Kernc <[email protected]> Closes pandas-dev#15335 from kernc/squeeze_axis_param and squashes the following commits: 44d3c54 [Kernc] fixup! ENH: .squeeze accepts axis parameter cc018c9 [Kernc] ENH: .squeeze accepts axis parameter
git diff upstream/master | flake8 --diff