Skip to main content

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.

Release files for whisper-pandas 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whisper-pandas 0.1
File Size Uploaded
whisper-pandas-0.1.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whisper-pandas 0.1
File Interpreter ABI Platform
whisper_pandas-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / whisper-pandas-0.1.tar.gz

Download URL whisper-pandas-0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
98bdedc59616eb0e55cf3cb70de11c11f058a7f8c7e99ff1a62d332501f4c601
BLAKE2b-256 checksum
How to use checksums
8dbf0aeb9fd9e18f1ee238c12b865d7f047a0ed3bddc02140e85d1493a3f3152
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / whisper_pandas-0.1-py3-none-any.whl

Download URL whisper_pandas-0.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d232966e8e0675ed403b1b2acb227711657ca0e36536324d1a2f15ccfa70a56
BLAKE2b-256 checksum
How to use checksums
1880a08b9a97d5bcb8fa55122ee0949f863057ef0580f7e87824e7ea74af4c5a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page