timeseries-shaper filters, transforms and engineer your timeseries dataframe
Project description
timeseries-shaper
Timeseries-Shaper is a Python library for efficiently filtering and preprocessing time series data using pandas. It provides a set of tools to handle various data transformations, making data preparation tasks easier and more intuitive.
Besides that multiple engineering specific methods are utilized to make it fast and easy to work with time series data.
Features | Structure
├── timeseries_shaper
│ ├── __init__.py
│ ├── base.py
│ ├── calculator
│ │ ├── __init__.py
│ │ └── numeric_calc.py
│ ├── cycles
│ │ ├── __init__.py
│ │ ├── cycle_processor.py
│ │ └── cycles_extractor.py
│ ├── events
│ │ ├── __init__.py
│ │ ├── outlier_detection.py
│ │ ├── statistical_process_control.py
│ │ ├── tolerance_deviation.py
│ │ └── value_mapping.py
│ ├── filter
│ │ ├── __init__.py
│ │ ├── boolean_filter.py
│ │ ├── custom_filter.py
│ │ ├── datetime_filter.py
│ │ ├── numeric_filter.py
│ │ └── string_filter.py
│ ├── functions
│ │ ├── __init__.py
│ │ └── lambda_func.py
│ ├── loader
│ │ ├── __init__.py
│ │ ├── metadata
│ │ │ ├── __init__.py
│ │ │ ├── metadata_api_loader.py
│ │ │ └── metadata_json_loader.py
│ │ └── timeseries
│ │ ├── __init__.py
│ │ ├── parquet_loader.py
│ │ ├── s3proxy_parquet_loader.py
│ │ └── timescale_loader.py
│ ├── stats
│ │ ├── __init__.py
│ │ ├── boolean_stats.py
│ │ ├── numeric_stats.py
│ │ ├── string_stats.py
│ │ └── timestamp_stats.py
│ ├── time_stats
│ │ ├── __init__,py
│ │ └── time_stats_numeric.py
Installation
Install timeseries-shaper using pip:
pip install timeseries-shaper
Useage
Here is a quick example to get you started:
import pandas as pd
from timeseries_shaper.filters import IntegerFilter, StringFilter
# Sample DataFrame
data = {
'value_integer': [1, 2, None, 4, 5],
'value_string': ['apple', 'banana', None, 'cherry', 'date']
}
df = pd.DataFrame(data)
# Initialize the filter object
integer_filter = IntegerFilter(df)
string_filter = StringFilter(df)
# Apply filters
filtered_integers = integer_filter.filter_value_integer_not_match(2)
filtered_strings = string_filter.filter_value_string_not_match('banana')
print(filtered_integers)
print(filtered_strings)
Documentation
For full documentation, visit GitHub Pages or check out the docstrings in the code.
Contributing
Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.
Please ensure to update tests as appropriate.
License
Distributed under the MIT License. See LICENSE for more information.
Development
-
Generate new pdocs:
.\generate_docs.sh
-
Install package locally:
pip install -e .
-
Run tests locally with pytest:
pytest ./tests
-
Build package for upload:
python setup.py sdist bdist_wheel
-
Upload build package to pypi:
twine upload dist/* --verbose --skip-existing
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
Built Distribution
File details
Details for the file timeseries-shaper-0.0.0.15.tar.gz
.
File metadata
- Download URL: timeseries-shaper-0.0.0.15.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4de097764c27ebc1dc782174857948ed31de7466fd3175e20bfd76767a3ef67 |
|
MD5 | 5d8fb6b9e1e5fec63b2c49561ffc6124 |
|
BLAKE2b-256 | 2603f59a6ba77b3f17ddb8077a99b47851082526ba9f1d3fc3977b685d7c5ccb |
File details
Details for the file timeseries_shaper-0.0.0.15-py3-none-any.whl
.
File metadata
- Download URL: timeseries_shaper-0.0.0.15-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eb70fe784a98d86092ae0ce399a55b7fe85da65d51ba3d1d458a9cafffca0f9 |
|
MD5 | dd418ec5e5b11a6e7b3d2cfe196bc19c |
|
BLAKE2b-256 | c6632fe92dff28cf7bd18c502ba5eeb15c784c21390c5494a4ddbab4fc9d02d1 |