StatsLibX logoStatsLibX

Installation

v0.4.0

Get started with StatsLibX in minutes

Quick Install

Install StatsLibX from PyPI using pip:

bash
pip install statslibx

Verify the installation by importing the library and running the welcome function:

python
import statslibx
statslibx.welcome()

If you see a welcome message, StatsLibX is ready to use.

Requirements

StatsLibX requires the following dependencies:

PackageMinimum Version
Python>= 3.9
pandas>= 1.3
numpy>= 1.21
scipy>= 1.7
matplotlib>= 3.4
seaborn>= 0.11
plotly>= 5.0
polars>= 0.20
scikit-learn>= 1.0 (optional extra)
statsmodels>= 0.13 (optional extra)
viewx>= 0.2.3 (optional extra)

Optional Dependencies

StatsLibX supports optional extras for specialized functionality:

viewx

Export results to HTML, PDF, or Presentation. Core analysis works without this extra.

all

viewx + statsmodels + scikit-learn + openpyxl + polars.

Install with extras:

bash
pip install statslibx[viewx]
bash
pip install statslibx[statsmodels,sklearn]
bash
pip install statslibx[all]

Development Install

If you want to contribute or try the latest unreleased version, clone the repository and install in editable mode:

bash
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:

python
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:

1

Load Data

Start by loading data from built-in datasets with load_iris(), load_penguins(), or load your own CSV/Excel files using pandas.

2

Explore with DescriptiveStats

Pass your data to DescriptiveStats and call methods like summary(), correlation(), and outliers() to explore your dataset.

3

Test Hypotheses with InferentialStats

Use InferentialStats to run t-tests, ANOVA, chi-square tests, and compute confidence intervals on your data.

4

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.