-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Period(Index) claims to be relative to 0001-01-01 00:00:00 #9056
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
Comments
no this is NOT true, nor guaranteed. A period index is a mapping between arbitrary (well freq based integers and the periods). |
Something else a bit strange:
Is this expected or a bug? (returns 2001 instead of 0001) |
But isn't it just a mapping of the number of periods of a certain |
no, has no fixed date at all, that's the whole point, they can represent ANY datetime. Timestamps are the opposite, they have really fine precision but limited range.
|
but still, the values in your example are just the number of periods (years) since 1970. I know it is not a 'fixed' moment in time, but the underlying representation is well defined no? Or do I miss something? |
some codes ARE relative, but it depends on the frequency. This is implementation detail. The only point of the differening numbers is for disambiguation. They could be anything.
|
* DOC: Remove incorrect elements of PeriodIndex docstring See #9056. * Removed trailing space
…6553) * DOC: Remove incorrect elements of PeriodIndex docstring See pandas-dev#9056. * Removed trailing space
…6553) * DOC: Remove incorrect elements of PeriodIndex docstring See pandas-dev#9056. * Removed trailing space
See the docstring of PeriodIndex: https://github.com/pydata/pandas/blob/master/pandas/tseries/period.py#L557, it says:
but that is not really the truth:
The text was updated successfully, but these errors were encountered: