Skip to main content

Simplified data manipulation and analysis tools

Project description

DataLib

Test

A simplified Python library for data manipulation, analysis, and machine learning.

Features

  • Data Processing: Loading, cleaning, and preprocessing functions
  • Analysis: Linear regression, polynomial regression, and multiple regression
  • Statistics: Basic statistical calculations
  • Visualization: Various plotting functions using matplotlib and seaborn
  • Machine Learning:
    • Supervised Learning: KNN, Decision Trees, Random Forests
    • Unsupervised Learning: K-means, PCA, Gaussian Mixture
    • Reinforcement Learning: Basic Q-Learning and SARSA

Installation

You can install the package directly from PyPI:

pip install oussama-datalib

Or using Poetry:

poetry add oussama-datalib

Usage

Here's a simple example of using DataLib:

from src.datalib.data_processing import load_csv, fill_missing_values
from src.datalib.visualization import plot_histogram
import pandas as pd

# Load data
df = pd.read_csv('your_data.csv')

# Fill missing values
df = fill_missing_values(df, 'column_name', method='mean')

# Create visualization
plot_histogram(df, 'column_name')

For a complete example, check out example/execution_example.py. To run it:

poetry run python example/execution_example.py

Testing

To run the tests:

poetry run pytest

Documentation

To build the documentation:

poetry run sphinx-build -b html docs docs/build

Then open docs/build/index.html in your browser.

Project Structure

datalib/
├── src/
│   └── datalib/
│       ├── analysis.py
│       ├── data_processing.py
│       ├── reinforcement.py
│       ├── statistics.py
│       ├── supervised.py
│       ├── unsupervised.py
│       └── visualization.py
├── tests/
├── docs/
└── example/
    └── execution_example.py

Dependencies

  • Python ≥ 3.10
  • NumPy ≥ 1.21.0
  • Pandas ≥ 2.2.3
  • Matplotlib ≥ 3.4.0
  • Seaborn ≥ 0.11.0
  • Scikit-learn ≥ 1.0.0
  • SciPy ≥ 1.7.0

License

MIT License

Author

Oussama ELAYEB (elayeb.oussama2020@gmail.com)

Development Setup

  1. Clone the repository
  2. Install dependencies:
poetry install
  1. Install pre-commit hooks:
poetry run pre-commit install
  1. Run tests:
poetry run pytest
  1. Run linting:
poetry run flake8
poetry run black .
poetry run isort .
 

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

oussama_datalib-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oussama_datalib-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file oussama_datalib-0.1.0.tar.gz.

File metadata

  • Download URL: oussama_datalib-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.15 Windows/10

File hashes

Hashes for oussama_datalib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8b2dc29f0d13fc6582c757fc34a8cacdbab96039a1949477213f1af7a6937b4
MD5 36691da1b9d3f45c7f7534d753f64699
BLAKE2b-256 442e72a8ff2fe025a35ea8f9160bb13b9bfaae28fbe238265113c1d3f40b8aaf

See more details on using hashes here.

File details

Details for the file oussama_datalib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oussama_datalib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.15 Windows/10

File hashes

Hashes for oussama_datalib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47a148badc9fd5de6313788a2eeeb5120a977f19af28e66f537b51b508ba7176
MD5 46cb2ff9e97faaedbacb4c502d5fc417
BLAKE2b-256 005828f5106d2d1fad607e490b8c721f5ac729bee74cd701fceb2bc2d1af70dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page