We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code should clarify the problem:
import pandas import pytz index = pandas.date_range(start='2012-12-24 16:00', end='2012-12-24 18:00', freq='H', tz='Europe/Berlin') ts = pandas.TimeSeries(index=index, data=index.hour) time_pandas = pandas.Timestamp('2012-12-24 17:00', tz='Europe/Berlin') time_datetime = datetime.datetime(2012,12,24,17,00, tzinfo=pytz.timezone('Europe/Berlin')) time_pandas == time_datetime ts[time_pandas] == ts[time_datetime]
While the two time stamps are equal, using them as an index on the TimeSeries results in different values. The same is true for slicing.
When using a tz-aware datetime for indexing/slicing, pandas seems to remove the timezone and interprete the time stamp as UTC.
The text was updated successfully, but these errors were encountered:
I see, thanks. Marked as a bug
Sorry, something went wrong.
BUG: DatetimeEngine does not handle pydatetime with tz #2575
ad249df
BUG: DatetimeEngine does not handle pydatetime with tz pandas-dev#2575
b1da6d9
No branches or pull requests
The following code should clarify the problem:
While the two time stamps are equal, using them as an index on the TimeSeries results in different values. The same is true for slicing.
When using a tz-aware datetime for indexing/slicing, pandas seems to remove the timezone and interprete the time stamp as UTC.
The text was updated successfully, but these errors were encountered: