Installation
v0.3.0Get started with StatsLibX in minutes
Quick Install
Install StatsLibX from PyPI using pip:
pip install statslibxVerify the installation by importing the library and running the welcome function:
import statslibx
statslibx.welcome()If you see a welcome message, StatsLibX is ready to use.
Requirements
StatsLibX requires the following dependencies:
| Package | Minimum Version |
|---|---|
| Python | >= 3.8 |
| pandas | >= 1.5 |
| numpy | >= 1.23 |
| scipy | >= 1.9 |
| matplotlib | >= 3.5 |
| seaborn | >= 0.11 |
| plotly | >= 5.0 |
| scikit-learn | >= 1.0 |
| statsmodels | >= 0.13 |
| viewx | >= 0.2.3 |
Optional Dependencies
StatsLibX supports optional extras for specialized functionality:
Adds seaborn and plotly for enhanced visualization capabilities.
Adds scikit-learn and statsmodels for machine learning integration.
Install with extras:
pip install statslibx[viz]pip install statslibx[advanced]pip install statslibx[viz,advanced] # All extrasDevelopment Install
If you want to contribute or try the latest unreleased version, clone the repository and install in editable mode:
git clone https://github.com/GhostAnalyst30/StatsLibX.git
cd StatsLibX
pip install -e .This installs StatsLibX in development mode, so changes to the source code take effect immediately.
Quick Start
Once installed, run a complete analysis in just a few lines:
from statslibx import DescriptiveStats
from statslibx.datasets import load_iris
data = load_iris()
ds = DescriptiveStats(data)
summary = ds.summary()
print(summary)
print(ds.mean('sepal_length'))First Steps
Here is a typical workflow to get you started with StatsLibX:
Load Data
Start by loading data from built-in datasets with load_iris(), load_penguins(), or load your own CSV/Excel files using pandas.
Explore with DescriptiveStats
Pass your data to DescriptiveStats and call methods like summary(), correlation(), and outliers() to explore your dataset.
Test Hypotheses with InferentialStats
Use InferentialStats to run t-tests, ANOVA, chi-square tests, and compute confidence intervals on your data.
Visualize with UtilsStats
Leverage UtilsStats for data transformation, validation, and visualization helpers to present your findings.
Troubleshooting
Common issues you might encounter and their solutions:
Command not found: pip
Ensure Python and pip are installed and added to your PATH. Try using python -m pip install statslibx instead.
ImportError: No module named 'statslibx'
The package may not be installed correctly. Re-run pip install statslibx and verify with pip list.
Version conflicts with dependencies
Create a fresh virtual environment to avoid conflicts: python -m venv venv, then activate it and install statslibx.
Permission denied during installation
Use pip install --user statslibx to install for your user only, or use a virtual environment.
Installation hangs or times out
Try using a mirror: pip install statslibx -i https://pypi.org/simple. You can also increase the timeout with --timeout 120.