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.

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file traindiagnostics-0.3.0.tar.gz.

File metadata

  • Download URL: traindiagnostics-0.3.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for traindiagnostics-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7bd161b816b46475831222ecd3774ccd7f739bbfd962f57e1065152bcf90858e
MD5 2d2ff8adf50cfe414dc8fd5e783d4d08
BLAKE2b-256 cb053acb1175242063596cc8dcb3debf33a88179fb9fddcbbaa0ebbafb2ecce6

See more details on using hashes here.

File details

Details for the file traindiagnostics-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: traindiagnostics-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for traindiagnostics-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9420f00e97401b0201a339d504804932a6daed5280617dc3244faece3ad089d9
MD5 a93036882a0af8ebbf1f597347f58c2a
BLAKE2b-256 c24c901002761f568c8e39fa86d430bfecdec325550dc48856ec60ff7560296a

See more details on using hashes here.

Supported by

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