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 .

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.0.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.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 04e7813753b54d8ae53525f4431d46a108f2affc851ecd6933ffa55c5a081286
MD5 3045a832c95f6d73e58d796e521cd47f
BLAKE2b-256 51b51a5a30c7da016613afdc24b03589ad72664906ebf73a0f1da475c94d5a98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oussama_datalib-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e072cc85c65e24f0dbd07088f7faaa6cdc124393517feb296127706d449c0e43
MD5 080a1e573a7d6c8242bbb9fe428b5f7d
BLAKE2b-256 f654a2fcabaa580d9615552ccf4347ed931938b541a5e29443094e6cb7d39a6b

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