forked from yhilpisch/tstables
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 0.0.7. First fairly well-tested release. Dropping the "dev" s…
…uffix from version number.
- Loading branch information
Showing
9 changed files
with
142 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,39 @@ Its goals are to support a workflow where tons (gigabytes) of time series data a | |
appended periodically to a HDF5 file, and need to be read many times (quickly) for analytical models | ||
and research. | ||
|
||
## Not ready for use yet | ||
## Example | ||
|
||
TsTables is not ready for use yet and is currently under development. The goal is to have something | ||
workable and being testing by end of May, 2014. If you are interested in the project (to contribute | ||
or learn when it is finished), email Andy Fiedler at <[email protected]>. | ||
This example reads in minutely bitcoin price data and then fetches a range of data. For the full example here, and other | ||
examples, see [EXAMPLES.md](EXAMPLES.md). | ||
|
||
```python | ||
# Class to use as the table description | ||
class BpiValues(tables.IsDescription): | ||
timestamp = tables.Int64Col(pos=0) | ||
bpi = tables.Float64Col(pos=1) | ||
|
||
# Use pandas to read in the CSV data | ||
bpi = pandas.read_csv('bpi_2014_01.csv',index_col=0,names=['date','bpi'],parse_dates=True) | ||
|
||
f = tables.open_file('bpi.h5','a') | ||
|
||
# Create a new time series | ||
ts = f.create_ts('/','BPI',BpiValues) | ||
|
||
# Append the BPI data | ||
ts.append(bpi) | ||
|
||
# Read in some data | ||
read_start_dt = datetime(2014,1,4,12,00) | ||
read_end_dt = datetime(2014,1,4,14,30) | ||
|
||
rows = ts.read_range(read_start_dt,read_end_dt) | ||
|
||
# `rows` will be a pandas DataFrame with a DatetimeIndex. | ||
``` | ||
|
||
## Pre-release software | ||
|
||
TsTables is currently under development and has yet to be used extensively in production. It is reaching the point where | ||
it is reasonably well-tested, so if you'd like to use it, feel free! If you are interested in the project (to contribute | ||
or to hear about updates), email Andy Fiedler at <[email protected]>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Store the version here so: | ||
# 1) we don't load dependencies by storing it in __init__.py | ||
# 2) we can import it in setup.py for the same reason | ||
# 3) we can import it into your module module | ||
__version__ = '0.0.7' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters