Chris Withers
2015-11-27 10:00:33 UTC
Hi All,
I feel like I must be missing something simple...
1 2015-01-01 01:31:00
2 2015-01-01 01:32:00
dtype: datetime64[ns]
...
TypeError: index is not a valid DatetimeIndex or PeriodIndex
x.tz_localize('America/Chicago').tz_convert('Europe/London'),
convert_dtype=False)
0 2015-01-01 07:30:00+00:00
1 2015-01-01 07:31:00+00:00
2 2015-01-01 07:32:00+00:00
dtype: object
But, as you can see, this changes the dtype. It's also painfully slow on
any reasonable size frame.
What should I be doing?
Chris
I feel like I must be missing something simple...
series = pd.Series(pd.date_range('2015-1-1 1:30', periods=3,
freq='min'))series
0 2015-01-01 01:30:001 2015-01-01 01:31:00
2 2015-01-01 01:32:00
dtype: datetime64[ns]
series.tz_localize('America/Chicago').tz_convert('Europe/London')
Traceback (most recent call last):...
TypeError: index is not a valid DatetimeIndex or PeriodIndex
x.tz_localize('America/Chicago').tz_convert('Europe/London'),
convert_dtype=False)
0 2015-01-01 07:30:00+00:00
1 2015-01-01 07:31:00+00:00
2 2015-01-01 07:32:00+00:00
dtype: object
But, as you can see, this changes the dtype. It's also painfully slow on
any reasonable size frame.
What should I be doing?
Chris
--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.