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/
│       ├── test_analysis.py
│       ├── test_data_processing.py
│       ├── test_reinforcement.py
│       ├── test_statistics.py
│       ├── test_supervised.py
│       ├── test_unsupervised.py
│       └── test_visualization.py
├── 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 .

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.1.tar.gz (8.3 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.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.1.tar.gz
  • Upload date:
  • Size: 8.3 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.1.tar.gz
Algorithm Hash digest
SHA256 0d36528a832ea02088bb5a24d2ccb8dc52c138bd31f5ebcebd5c05fd8e4acf7d
MD5 d99bfa7bc8a75d171a678365143e9820
BLAKE2b-256 d09a42026bb7dbcee1000f88be5c73adfcb2f1fb5cb91dbedb366f6b92e34c8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f668cd88b16a2a5b40c22f9ca034d049ebb93cf85a00e1fb9c369dc6a4563e75
MD5 f50eca68d5b8f2148042eeb8e7bd83de
BLAKE2b-256 9b127088e9d264a5e01db361c2602feabb26fb11086b3c809e9a3aaed9c76c6c

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