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/
│     ├── init.py
│     ├── analysis.py
│     ├── data_processing.py
│     ├── reinforcement.py
│     ├── statistics.py
│     ├── supervised.py
│     ├── unsupervised.py
│     └── visualization.py
├── tests/
│   ├── conftest.py
│   ├── test_analysis.py
│   ├── test_data_processing.py
│   ├── test_reinforcement.py
│   ├── test_statistics.py
│   ├── test_supervised.py
│   ├── test_unsupervised.py
│   └── test_visualization.py
├── docs/
│   ├── conf.py
│   ├── index.rst
│   ├── modules.rst
│   └── build/
│   ├── html/
│   ├── doctrees/
│   └── static/
├── example/
│   └── execution_example.py
├── .gitignore
├── LICENSE
├── README.md
├── pyproject.toml
├── setup.py
└── .pre-commit-config.yaml

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 .

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

For questions, feedback, or support:

Acknowledgments

  • Thanks to the Python community for the amazing libraries that made this project possible
  • Special thanks to all contributors who help improve this library

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.2.2.tar.gz (8.5 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.2.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.2.tar.gz
  • Upload date:
  • Size: 8.5 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.2.2.tar.gz
Algorithm Hash digest
SHA256 9295afb82b206b847677e7ee8382da8a96ae082cdb7bb3bb8f187952dd1cc1dc
MD5 60ab2631cbe6391ec362062f4c800225
BLAKE2b-256 3009cae054bcd7d560e9f0f6b768054775a501f4f50af3a01269b0606b7834cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa21214de34fc022eaf4252a76211f9732d1927a4fa55426d3e6e34859de7e32
MD5 006dc637cf2fcfe9edb708999870ad18
BLAKE2b-256 b359e09bb4a253c91536f46e30bbe77022611c22fb2ce093d9b259659bf66f46

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