ZeitPy
ZeitPy is a package for time series analysis. Its main purpose is to abstract some vital operations to analyse time series data. At its core is the Zeit class, which provides attributes and methods for initializing a (Pandas) time series, performing Exploratory Data Analysis (Augmented Dickey-Fuller test, visualize periodograms, seasonal, and lag plots, etc.), forecasting and performance assessment.
Class Overview ℹ️
Zeit
Class Initialization
In [1]: import zeitpy as zp
...: zo = zp.Zeit('sales_luanda.csv', date_format = '%Y-%m-%d', date_col = 'date', data_col = 'sales')
- dataset: the DataFrame, Series or csv file path containing the time series data.
- date_format: the format of the "date_col" instances to be converted into datetime.
- date_col: the column containing the time observations.
- data_col: the column containing the values (in case of csv files or DataFrames).
Attributes and Methods
-
data- this attribute retrieves the time series data wrapped by the Zeit object.
-
seasonal_decomposition(model: str = 'additive', period: int = 12, **plot_args) -> None- A method for plotting the seasonal decomposition of the time series using moving averages.
- Parameters:
model: the type of seasonal decompositionperiod: period of the series (12 for monthly data, 1 for annual, etc.)
Usage ⚙️📦
How to get the package?
Installation via PyPI
pip install zeitpy
Installation of source distribution (.tar.gz)
pip install path/to/zeitpy-0.1.2.tar.gz
Installation of pre-built distribution (.whl)
pip install path/to/zeitpy-0.1.2-py3-none-any.whl
Cloning the package repository
git clone https://github.com/domingosdeeulariadumba/ZeitPy.git
Importing the package
In [1]: import zeitpy as zp
Example: Injecting a dataset and accessing the first five records of the time series
In [2]: zo = zp.Zeit('sales_luanda.csv', date_format = '%Y-%m-%d', date_col = 'date', data_col = 'sales')
...: zo.data.head()
Out[2]:
2024-09-07 86662
2024-09-08 449329
2024-09-09 64041
2024-09-10 420328
2024-09-11 351528
Freq: D, Name: sales, dtype: int32
📑 You can view all operations provided by the Zeit class implemented here.
License ⚖️
This project is licensed under the MIT LICENSE.
Issues and Contributions 🧱
Feel free to submit any issue you may find in this package or recommend additional features not already listed here. If you find this useful, please fork the repository, create a feature branch, and submit a pull request.
Connect with me 🌐
Metadata
Release files for zeitpy 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zeitpy-0.1.2.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zeitpy-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / zeitpy-0.1.2.tar.gz
| Download URL | zeitpy-0.1.2.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd764dc7d80afac1723fd82522d111f7e3158997a169ed852a0514011a36fc73
|
|
BLAKE2b-256 checksum How to use checksums |
de8f4d707d8697a56b920fe4a03865ca0767cc59813dbae579aa60667351cafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / zeitpy-0.1.2-py3-none-any.whl
| Download URL | zeitpy-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
670202a8257a1c8efa36b0ef25062005305b2e2e1257d720a0811d1cae697114
|
|
BLAKE2b-256 checksum How to use checksums |
07c5339f02e4206c96a920103b120eae0042f1825e33026c874cc106de0d81ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|