Skip to content

Inconsistent behaviour of to_period #2232

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

Closed
killinc opened this issue Nov 12, 2012 · 0 comments
Closed

Inconsistent behaviour of to_period #2232

killinc opened this issue Nov 12, 2012 · 0 comments
Milestone

Comments

@killinc
Copy link

killinc commented Nov 12, 2012

to_period works correctly on individual timestamp objects with timezone information. When it is applied to datetime indexes with timezone information though, the conversion appears to happen based on the underlying UTC timestamp.
For example:
index = date_range('2000-1-1', periods=1000, freq='D', tz = 'Australia/Sydney')
index[0].to_period('D') # gives a different result from:
index.to_period('D')[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants