Get started with StatClean in seconds using pip.
pip install statclean
This installs the latest stable version with all required dependencies.
StatClean requires Python 3.7 or higher and the following packages:
For shrinkage covariance estimation in Mahalanobis distance calculations and example datasets.
For contributing or accessing the latest features:
# Clone repository
git clone https://github.com/SubaashNair/StatClean.git
cd StatClean
# Install in development mode
pip install -e .
# Install development dependencies
pip install -r requirements.txt
Test your installation with this simple verification script:
import statclean
from statclean import StatClean
import pandas as pd
# Quick test
df = pd.DataFrame({'test': [1, 2, 3, 100, 4]})
cleaner = StatClean(df)
print("StatClean installed successfully!")
print(f"Version: {statclean.__version__}")
# Make sure you installed the package
pip install statclean
# Check if it's installed
pip show statclean
# Create a fresh virtual environment
python -m venv statclean_env
source statclean_env/bin/activate # On Windows: statclean_env\Scripts\activate
pip install statclean
# For headless servers, set matplotlib backend
export MPLBACKEND=Agg
Add this to your script for programmatic backend setting:
import matplotlib
matplotlib.use('Agg') # Must be before importing pyplot
# Install optimized numerical libraries
pip install numpy[mkl] pandas[performance]
# For Intel processors
conda install mkl mkl-service
Use StatClean in a containerized environment:
FROM python:3.9-slim
# Install StatClean
RUN pip install statclean
# Set working directory
WORKDIR /app
# Copy your application
COPY . .
# Run your application
CMD ["python", "your_script.py"]
StatClean will be available on conda-forge soon:
conda install -c conda-forge statclean
Install the Python extension and StatClean will provide full IntelliSense support with type hints.
Recommended extensions: Python, PylanceStatClean includes comprehensive type annotations for excellent PyCharm integration.
Professional and Community editions supportedpip install jupyter
jupyter notebook
Then import StatClean:
from statclean import StatClean
Now that StatClean is installed, explore the documentation: