A toolbox to analyse diagnostic train data!
Project description
A Python library for unevenly-spaced time series analysis in train diagnostics. Build on top of the magnificent ticts library.
Installation
pip install traindiagnostics
Want to try it out first without installing? With binder you can test out the code in an online jupyter notebook.
Usage
import traindiagnostics as td
ts = td.TimeSeries({
'2019-01-01 09:00:00': 0,
'2019-01-01 09:00:05': 1,
'2019-01-01 09:01:02': 0,
'2019-01-01 09:05:09': 1,
'2019-01-01 09:05:16': 0,
'2019-01-01 09:11:01': 1,
'2019-01-01 09:12:59': 0,
})
not_in_index = '2019-01-01 00:05:00'
assert ts[not_in_index] == 1 # step function, previous value
ts['2019-01-01 00:04:00'] = 10
assert ts[not_in_index] == 10
assert ts + ts == 2 * ts
ts_evenly_spaced = ts.sample(freq='1Min')
# From ticts to pandas, and the other way around
assert ts.equals(
ts.to_dataframe().to_ticts(),
)
Contributing
Missing some features? create an issue or pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
traindiagnostics-0.3.0.tar.gz
(18.0 kB
view hashes)
Built Distribution
Close
Hashes for traindiagnostics-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9420f00e97401b0201a339d504804932a6daed5280617dc3244faece3ad089d9 |
|
MD5 | a93036882a0af8ebbf1f597347f58c2a |
|
BLAKE2b-256 | c24c901002761f568c8e39fa86d430bfecdec325550dc48856ec60ff7560296a |