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 hashes)
Built Distribution
Close
Hashes for rolling_window-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4b9e80b641aa470a90900413873541a87e5d697ef5b6ef8046f5c1d2fe9c19 |
|
MD5 | df733bc5d7991902cc7a6dc9fc1c1e23 |
|
BLAKE2b-256 | 2d33efccdf8e01f17096d4281d92e27ae111a8b5cd4081c8b5279c17200c4836 |