-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Simplify Period Construction / Resolution #7607
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
MS_RESO = 1 | ||
S_RESO = 2 | ||
T_RESO = 3 | ||
H_RESO = 4 |
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 not sure this is tested but in theory an older pickle will break as these codes have changed
can u preserve the original codes (and just add the new one)?
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.
Ah, I thought this is not stored as property. Modified.
@@ -3357,13 +3357,16 @@ cpdef resolution(ndarray[int64_t] stamps, tz=None): | |||
return reso | |||
|
|||
US_RESO = 0 | |||
MS_RESO = 0.5 |
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.
no make it 5
these are just enums
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.
No, it should have order for comparison. How should the value be?
https://github.com/pydata/pandas/blob/master/pandas/tseries/index.py#L1172
modify this to add Period/PeriodIndex https://github.com/pydata/pandas/blob/master/pandas/io/tests/generate_legacy_pickles.py run it on 0.14.0 and add generated pickles to the repo |
if u want to add some for prior versions of pandas ok too (this scipy is meant to be independent of pandas versions for this reason) the test suite will test the pickles on current version for back compat tests |
Thanks. As
|
ahh right.....that is a separate issue (and should be resolved as well) |
OK. Added |
CLN: Simplify Period Construction / Resolution
gr8 thanks! |
Simplified
Period
construction a little by addingmillisecond
resolution.