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
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.1.0.tar.gz
(17.7 kB
view hashes)
Built Distribution
Close
Hashes for traindiagnostics-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 661952aef341c10b882628859426fff6a72f0ea392cac9e65b35074e5931b122 |
|
MD5 | 2d5c57f3f6e3e53b6c847d4651fec7e3 |
|
BLAKE2b-256 | c5ab727914218df9f94c8367671f383b6288426cab8e35020e87bfeaf09e0004 |