Skip to main content

WhisperDB Python Pandas Reader

Project description

WhisperDB Python Pandas Reader

Getting started

Install:

pip install whisper-pandas

Use as Python package:

# Simple to read any Whisper file
>>> from whisper_pandas import WhisperFile
>>> wsp = WhisperFile.read("example.wsp")

# Simple to work with metadata as objects
>>> wsp.meta.archives
[WhisperArchiveMeta(index=0, offset=52, seconds_per_point=10, points=1555200, retention=15552000),
 WhisperArchiveMeta(index=1, offset=18662452, seconds_per_point=60, points=5256000, retention=315360000),
 WhisperArchiveMeta(index=2, offset=81734452, seconds_per_point=3600, points=87601, retention=315363600)]

# Simple to work with data as `pandas.Series`
>>> wsp.data[1]
2017-02-10 07:07:00+00:00    0.000000
2017-02-10 07:08:00+00:00    0.000000
2017-02-10 07:09:00+00:00    0.000000
2017-02-10 07:10:00+00:00    0.000000
2017-02-10 07:11:00+00:00    0.000000
                               ...   
2021-07-20 13:35:00+00:00    4.099915
2021-07-20 13:36:00+00:00    4.104024
2021-07-20 13:37:00+00:00    4.099772
2021-07-20 13:38:00+00:00    4.101358
2021-07-20 13:39:00+00:00    4.099854
Length: 2331015, dtype: float32

Use as command line tool:

whisper-pandas example.wsp

Description

WhisperDB is a fixed-size time series format (see docs).

The official Python package is here: whisper

You should use it, except if you like Pandas and only need to read (not write) Whisper files, then you should use whisper-pandas.

Why?

  • Mucho simpler to use
  • Mucho less likely you will shoot yourself in the foot
  • Mucho speedy

Currently we use whisper.info internally to read the metadata, and then Numpy & Pandas to read the data, using objects for the metadata and some conveniences like quickly showing what data is available in a given file or reading zipped files.

Partial reading is not implemented, a given file is always read completely and the data directly converted to columnar pandas.Series format with a datetime index.

Development

Contributions are welcome via Github pull requests.

You can run the tests via pytest.

The packaging follows the recommendation in Packaging Python Projects. To make a release increase the version number in setup.cfg and run the commands there.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

whisper-pandas-0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

whisper_pandas-0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file whisper-pandas-0.1.tar.gz.

File metadata

  • Download URL: whisper-pandas-0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for whisper-pandas-0.1.tar.gz
Algorithm Hash digest
SHA256 98bdedc59616eb0e55cf3cb70de11c11f058a7f8c7e99ff1a62d332501f4c601
MD5 30cba876d9a242df83d8bc012d3c2cd8
BLAKE2b-256 8dbf0aeb9fd9e18f1ee238c12b865d7f047a0ed3bddc02140e85d1493a3f3152

See more details on using hashes here.

File details

Details for the file whisper_pandas-0.1-py3-none-any.whl.

File metadata

  • Download URL: whisper_pandas-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for whisper_pandas-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d232966e8e0675ed403b1b2acb227711657ca0e36536324d1a2f15ccfa70a56
MD5 db37daba58c521844db0552d8b99228b
BLAKE2b-256 1880a08b9a97d5bcb8fa55122ee0949f863057ef0580f7e87824e7ea74af4c5a

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