Skip to main content

A toolbox to analyse diagnostic train data!

Project description

PyPI - Python Version Pypi package PyPI - License Code style: black Launch Binder

A Python library for unevenly-spaced time series analysis in train diagnostics. Build on top of the magnificent ticts library.


pip install traindiagnostics

Want to try it out first without installing? With binder you can test out the code in an online jupyter notebook.


 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(


Missing some features? create an issue or pull request!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for traindiagnostics, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size traindiagnostics-0.3.0-py2.py3-none-any.whl (19.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size traindiagnostics-0.3.0.tar.gz (18.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page