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.

Source Distribution

traindiagnostics-0.3.0.tar.gz (18.0 kB view hashes)

Uploaded source

Built Distribution

traindiagnostics-0.3.0-py2.py3-none-any.whl (19.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page