Skip to content
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

Storing time zones HDFStore #1232

Closed
wesm opened this issue May 13, 2012 · 0 comments
Closed

Storing time zones HDFStore #1232

wesm opened this issue May 13, 2012 · 0 comments

Comments

@wesm
Copy link
Member

wesm commented May 13, 2012

Need to be careful to not break backwards compat (don't REQUIRE that time zone be stored in the hdf5 file)

In [10]: ts
Out[10]: 
2000-01-01 00:00:00-05:00    1.673428
2000-01-01 00:00:01-05:00   -0.647638
2000-01-01 00:00:02-05:00    0.185806
2000-01-01 00:00:03-05:00   -1.181972
2000-01-01 00:00:04-05:00    1.172915
2000-01-01 00:00:05-05:00   -1.058382
2000-01-01 00:00:06-05:00    0.716881
2000-01-01 00:00:07-05:00   -1.077554
2000-01-01 00:00:08-05:00   -1.347873
2000-01-01 00:00:09-05:00   -1.283497
2000-01-01 00:00:10-05:00   -0.628599
2000-01-01 00:00:11-05:00    1.681750
2000-01-01 00:00:12-05:00   -0.876274
2000-01-01 00:00:13-05:00   -0.137497
2000-01-01 00:00:14-05:00    1.199150
...
2000-01-02 03:46:25-05:00   -1.449709
2000-01-02 03:46:26-05:00    1.333123
2000-01-02 03:46:27-05:00   -0.306314
2000-01-02 03:46:28-05:00    0.040174
2000-01-02 03:46:29-05:00    0.823003
2000-01-02 03:46:30-05:00   -0.721399
2000-01-02 03:46:31-05:00   -2.812037
2000-01-02 03:46:32-05:00    0.721936
2000-01-02 03:46:33-05:00   -1.538009
2000-01-02 03:46:34-05:00    0.726892
2000-01-02 03:46:35-05:00    0.336684
2000-01-02 03:46:36-05:00    1.128328
2000-01-02 03:46:37-05:00    0.106069
2000-01-02 03:46:38-05:00   -1.167883
2000-01-02 03:46:39-05:00   -1.695608
Freq: S, Length: 100000

In [11]: store['bar']
Out[11]: 
2000-01-01 05:00:00    1.673428
2000-01-01 05:00:01   -0.647638
2000-01-01 05:00:02    0.185806
2000-01-01 05:00:03   -1.181972
2000-01-01 05:00:04    1.172915
2000-01-01 05:00:05   -1.058382
2000-01-01 05:00:06    0.716881
2000-01-01 05:00:07   -1.077554
2000-01-01 05:00:08   -1.347873
2000-01-01 05:00:09   -1.283497
2000-01-01 05:00:10   -0.628599
2000-01-01 05:00:11    1.681750
2000-01-01 05:00:12   -0.876274
2000-01-01 05:00:13   -0.137497
2000-01-01 05:00:14    1.199150
...
2000-01-02 08:46:25   -1.449709
2000-01-02 08:46:26    1.333123
2000-01-02 08:46:27   -0.306314
2000-01-02 08:46:28    0.040174
2000-01-02 08:46:29    0.823003
2000-01-02 08:46:30   -0.721399
2000-01-02 08:46:31   -2.812037
2000-01-02 08:46:32    0.721936
2000-01-02 08:46:33   -1.538009
2000-01-02 08:46:34    0.726892
2000-01-02 08:46:35    0.336684
2000-01-02 08:46:36    1.128328
2000-01-02 08:46:37    0.106069
2000-01-02 08:46:38   -1.167883
2000-01-02 08:46:39   -1.695608
Freq: S, Length: 100000

In [12]: store['bar'].index
Out[12]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[2000-01-01 05:00:00, ..., 2000-01-02 08:46:39]
Length: 100000, Freq: S, Timezone: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant