-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API/CLN: Have toplevel pd.pivot mirror pivot instead of pivot_simple #22209
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
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.
small comment, ping when green.
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -467,6 +467,7 @@ Other API Changes | |||
- :meth:`PeriodIndex.tz_convert` and :meth:`PeriodIndex.tz_localize` have been removed (:issue:`21781`) | |||
- :class:`Index` subtraction will attempt to operate element-wise instead of raising ``TypeError`` (:issue:`19369`) | |||
- :class:`pandas.io.formats.style.Styler` supports a ``number-format`` property when using :meth:`~pandas.io.formats.style.Styler.to_excel` (:issue:`22015`) | |||
- Top level function :meth:`pandas.pivot` now maps directly to the instance method :meth:`DataFrame.pivot` (:issue:`22116`) |
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.
this is not necessary, you are cleaning internal code and its not user facing
Codecov Report
@@ Coverage Diff @@
## master #22209 +/- ##
==========================================
- Coverage 92.06% 92.06% -0.01%
==========================================
Files 169 169
Lines 50698 50687 -11
==========================================
- Hits 46676 46664 -12
- Misses 4022 4023 +1
Continue to review full report at Codecov.
|
Ping @jreback. All green. |
pandas/core/reshape/pivot.py
Outdated
return series.unstack() | ||
|
||
|
||
def _slow_pivot(index, columns, values): |
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.
I don't think we are using this anywhere but the test_panel
test? if so I would just blow it away & remove the test
@jreback removed those unused methods and test and all green. |
thanks @mroeschke nice clean! |
We cannot simply change this, as this completely breaks existing usage of |
We could keep |
That's certainly an option. |
closes API: Have pd.pivot mirror pivot instead of pivot_simple #22116
tests added / passed
passes
git diff upstream/master -u -- "*.py" | flake8 --diff
whatsnew entry
Moved
pivot
frompandas/core/reshape/reshape.py
topandas/core/reshape/pivot.py
Moved
pivot_simple
and_slow_pivot
frompandas/core/reshape/reshape.py
topandas/core/reshape/pivot.py
(only used by one panel test)Remapped top level
pd.pivot
to usepivot
instead ofpivot_simple
Added some additional tests for
pd.pivot