No project description provided
Project description
DataFrame Statistical Analyzer Utility
The DataFrameAnalyzer
project provides a robust and extensible tool for analyzing and visualizing data stored in a Pandas DataFrame. The tool encapsulates various data analysis functionalities, including summary statistics, percentage change computation, outlier detection, trend analysis, moving average calculation, correlation analysis, and seasonal pattern interpretation. The project is designed following the SOLID principles and incorporates design patterns to ensure maintainability and ease of use.
Features
- Summary Statistics: Statistical summary of the DataFrame.
- Month-to-Month Percentage Changes: Percentage changes between consecutive months.
- Outliers Detection (Z-score > 3): DataFrame segments identified as outliers based on Z-score.
- Outliers Detection (MAD): DataFrame segments identified as outliers based on Median Absolute Deviation.
- Trend Analysis (Linear Regression): Slope and intercept of linear trends for numeric columns.
- Moving Average (3 months window): Moving average values for numeric columns over a 3-month window.
- Calculating DIPS: DataFrame segments identified as dips below certain thresholds.
- Calculating Increases: DataFrame segments identified as increases above certain thresholds.
- Seasonal Patterns: Monthly seasonal patterns identified using Holt-Winters exponential smoothing.
- Correlation Analysis: Correlation matrix between numeric columns.
Installation
-
Clone the repository:
git clone https://github.com/DurgeshRathod/DataFrameAnalyzer.git cd DataFrameAnalyzer
-
Install the required dependencies:
pip install -r requirements.txt
Usage
-
Import the necessary modules:
import pandas as pd from DataFrameAnalyzer import DataFrameAnalyzer
-
Prepare your DataFrame:
data = { "month": ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], "stock_price": [50.0, 51.5, 49.8, 52.0, 53.2, 54.0, 55.0, 56.0, 57.5, 59.0, 60.0, 61.0] } df = pd.DataFrame(data)
-
Initialize the
DataFrameAnalyzer
with the DataFrame:analyzer = DataFrameAnalyzer(df)
-
Perform the analysis:
analyzer.analyze()
-
Expected Outputs When you run the analyze() method of DataFrameAnalyzer, you can expect to see the following outputs:
- Summary Statistics: Statistical summary of the DataFrame.
- Month-to-Month Percentage Changes: Percentage changes between consecutive months.
- Outliers Detection (Z-score > 3): DataFrame segments identified as outliers based on Z-score.
- Outliers Detection (MAD): DataFrame segments identified as outliers based on Median Absolute Deviation.
- Trend Analysis (Linear Regression): Slope and intercept of linear trends for numeric columns.
- Moving Average (3 months window): Moving average values for numeric columns over a 3-month window.
- Calculating DIPS: DataFrame segments identified as dips below certain thresholds.
- Calculating Increases: DataFrame segments identified as increases above certain thresholds.
- Seasonal Patterns: Monthly seasonal patterns identified using Holt-Winters exponential smoothing.
- Correlation Analysis: Correlation matrix between numeric columns.
Contributing
We welcome contributions to the DataFrameAnalyzer
project. Please fork the repository and submit a pull request with your changes. Ensure your code adheres to the existing style and includes appropriate tests.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Acknowledgments
This project utilizes several open-source libraries, including Pandas, Matplotlib, Scipy, Scikit-learn, and Statsmodels. We thank the developers and maintainers of these libraries for their invaluable contributions to the open-source community.
Project details
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 dataframe_statistical_analyzer-0.1.0.tar.gz
.
File metadata
- Download URL: dataframe_statistical_analyzer-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c8b8bf91fbd622dfe3c6a97caec159e31736332cf4f56e2a9299f694e22eda6 |
|
MD5 | 489b43af297da650179b7648d8c10d91 |
|
BLAKE2b-256 | 60f9ef0fb59a95b1fc4f37495ebc47244730aab905cd4fb0ca94cf5e12fdd67b |
File details
Details for the file dataframe_statistical_analyzer-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: dataframe_statistical_analyzer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa4fa110ae5bc1fd8804e2d5e46929f3fd5da79616bb85d67927c5740814d43b |
|
MD5 | fd4fceda5bc27c28f7894700f498f217 |
|
BLAKE2b-256 | 3a82d385f3f5dc3cb996e62a95a53d791b62b3d2c9652549af9bec852869acc4 |