-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: PeriodIndex.values now return array of Period objects #13988
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
Current coverage is 85.26% (diff: 93.25%)@@ master #13988 diff @@
==========================================
Files 139 139
Lines 50446 50475 +29
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43018 43040 +22
- Misses 7428 7435 +7
Partials 0 0
|
this looks fine. pls add a small section for showing the changes in whatsnew (though if this should be merged after #13941 can just add on there (and vice-versa) |
OK, let #13941 be first, because this PR includes some workarounds which can be removed once we have |
@sinhrks pls rebase. This will be a welcome change! |
Needs a new rebase ;) (for your fixed of the tests) |
return self._values.view('i8') | ||
|
||
@property | ||
def values(self): |
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 add docstrings for those?
Can you also add a whatsnew notice? |
277e9c6
to
90aa8d5
Compare
Added whatsnew, now ready for review. |
thanks! |
.. ipython:: python | ||
|
||
pi = pd.PeriodIndex(['2011-01', '2011-02'], freq='M') | ||
pi.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.
@sinhrks is it correct to say that to get the integer values as before (if you for some reason were using it), you cas access it through .asi8
?
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.
.asi8 is not really public
.astype is the single method for converting types
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.
further the codes are a private impl
git diff upstream/master | flake8 --diff
This change itself needs more tests / perf testing, split from the original PR.