Time series in Python up to microseconds
I would like to handle time series in Python.
I was asked to use scikit.timeseries, but I need to process up to microseconds, and this last one, as far as I know, processes up to milliseconds.
Do you know any other library that can do this? At some point I need to merge 2 time series taken at different times and I would like to avoid rewriting such functions or any new classes from scratch whenever possible.
a source to share
The module datetime
processes microseconds:
>>> import datetime
>>> now = datetime.datetime.now()
>>> now.microsecond
38672
Performing arithmetic operations with datetime
an object timedelta
returns a new object datetime
:
>>> yest = now - datetime.timedelta(days=1)
>>> yest
datetime.datetime(2010, 5, 9, 12, 37, 19, 38672)
>>> now
datetime.datetime(2010, 5, 10, 12, 37, 19, 38672)
Performing arithmetic operations on objects datetime
returns an object timedelta
.
>>> now - yest
datetime.timedelta(1)
a source to share
Read about RedBlackPy . You can read the article with code examples. I think RedBlackPy.Series is what you want (it's built to work with time series conveniently). RedBlackPy is now available for macosx and linux.
a source to share