BUG: unstack fails in PeriodIndex by sinhrks · Pull Request #7041 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation12 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Closes #4342.
Also changed Categorical
and PeriodIndex.factorize
to make index sorted like other indexes do.
@@ -458,6 +458,7 @@ Bug Fixes |
---|
- Bug in timeseries-with-frequency plot cursor display (:issue:`5453`) |
- Bug surfaced in groupby.plot when using a ``Float64Index`` (:issue:`7025`) |
- Stopped tests from failing if options data isn't able to be downloaded from Yahoo (:issue:`7034`) |
- Bug in ``unsatck`` raises ``ValueError`` when ``MultiIndex`` contains ``PeriodIndex`` (:issue:`4342`) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unstack
did anything change because of the sorting change?
@sinhrks fyi, in general ping me when you think something is ready for merging (esp if its marked for 0.14). try to make green! if its not, ok to ping as well and will take a look
Sorting change only affects to Categorical
creation with PeriodIndex
. Because:
Categorical
callsIndex.factorize
if it has the method. Currently,PeriodIndex
is the only class which has the method. Thus, any other classes and indexes are not affected.PeriodIndex.factorize
usesort=False
as default (which derived fromcore.algorithms.factorize
). Thus, any other function which usePeriodIndex.factorize
will get the same result as before.
ok; looking at this code, I think you can define factorize
for Index/Series
in core/base.py,
then just do the test hasattr(labels,'factorize')
ok, i think you can rebase this and then good?
Should be rebased, I will finish it soon.
jreback added a commit that referenced this pull request
BUG: unstack fails in PeriodIndex
Labels
Period data type
Concat, Merge/Join, Stack/Unstack, Explode
2 participants