No project description provided
Project description
# Rolling Window
## A generic rolling window function for analytics
Install with:
```
pip install rolling_window
```
(To be expanded on)
Example of use (see test files for some more details):
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
## A generic rolling window function for analytics
Install with:
```
pip install rolling_window
```
(To be expanded on)
Example of use (see test files for some more details):
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rolling_window-0.1.2.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rolling_window-0.1.2.tar.gz.
File metadata
- Download URL: rolling_window-0.1.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffdda5a6e696ac2c04005ebaab89abd8a3af097f659bb6a28d8db342da830e47
|
|
| MD5 |
a91e159086f58637edd57f5e8c21d164
|
|
| BLAKE2b-256 |
fe01b064b154d2f88327193d9b87d226f16df54898e5e1cf1e744c9f44275b63
|
File details
Details for the file rolling_window-0.1.2-py3-none-any.whl.
File metadata
- Download URL: rolling_window-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa4b9e80b641aa470a90900413873541a87e5d697ef5b6ef8046f5c1d2fe9c19
|
|
| MD5 |
df733bc5d7991902cc7a6dc9fc1c1e23
|
|
| BLAKE2b-256 |
2d33efccdf8e01f17096d4281d92e27ae111a8b5cd4081c8b5279c17200c4836
|