Skip to main content

Your Data Science Bro. One import away.

Project description

dsbro logo

dsbro

CI Python 3.9+ License: MIT PyPI version

Your Data Science Bro. One import away.

dsbro is a lightweight Python toolkit for notebook-heavy data science work. It is built for the repeated workflow most people have in Kaggle, Colab, and local Jupyter notebooks: setup, load data, inspect it, clean it, visualize it, and train a baseline model fast.

What dsbro covers

  • dsbro.utils: notebook setup, seeding, timers, system info, downloads, simple parallel work
  • dsbro.io: file loading, saving, previews, directory trees, file search, submission helpers
  • dsbro.eda: overview tables, missing-value analysis, drift checks, target analysis, comparisons
  • dsbro.prep: encoding, scaling, missing-value filling, feature engineering, memory reduction
  • dsbro.viz: themed matplotlib and optional plotly charts for fast notebook visuals
  • dsbro.metrics: classification and regression metrics in one place
  • dsbro.ml: model comparison, cross-validation, training, tuning, stacking, pseudo-labeling
  • dsbro.text: text cleaning, tokenization, word frequencies, and TF-IDF features

Current status

Implemented now:

  • Core package scaffold and packaging
  • utils, io, eda, prep, viz, metrics, ml, and text
  • Built-in help and about/version entry points
  • Tests across the implemented modules
  • Quickstart notebook in examples/quickstart.ipynb

Still planned:

  • Final polish for docs/examples
  • Additional ML/deep-learning extras over time

Installation

From PyPI:

pip install dsbro

From GitHub:

pip install git+https://github.com/muhammadibrahim313/dsbro.git

For local development:

pip install -e ".[dev]"

Optional extras:

pip install -e ".[ml]"
pip install -e ".[plotly]"
pip install -e ".[all]"

dsbro is now available on PyPI, and the repository is still in active buildout.

Quick example

import dsbro
import pandas as pd

dsbro.setup()

train = pd.DataFrame(
    {
        "age": [22, 35, 41, 28],
        "city": ["lahore", "karachi", "lahore", "islamabad"],
        "purchased": [0, 1, 1, 0],
    }
)

overview = dsbro.eda.overview(train)
processed, report = dsbro.prep.auto_preprocess(train, target="purchased")
leaderboard = dsbro.ml.compare(train, target="purchased", cv=2)

Help system

dsbro includes a built-in cheatsheet:

dsbro.help()
dsbro.help("viz")
dsbro.help("encode")
dsbro.about()
dsbro.version()

Notebook example

The repository includes a walkthrough notebook:

It demonstrates:

  • dsbro.setup()
  • dsbro.eda.overview()
  • dsbro.prep.datetime_features()
  • dsbro.prep.text_features()
  • dsbro.prep.auto_preprocess()
  • dsbro.viz.bar()
  • dsbro.ml.compare()

Development

pytest tests/ -v
ruff check dsbro/ tests/
ruff format dsbro/ tests/
python -m build

Roadmap

  • Expand example notebooks
  • Add GitHub Actions CI
  • Publish to TestPyPI, then PyPI
  • Continue polishing module docs and tutorial coverage

License

MIT. See LICENSE.

Contributing

We welcome contributions! Please read CONTRIBUTING.md for guidelines.

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

dsbro-0.2.0.tar.gz (223.7 kB view details)

Uploaded Source

Built Distribution

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

dsbro-0.2.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsbro-0.2.0.tar.gz
  • Upload date:
  • Size: 223.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dsbro-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e050675d0e5a4e435e804de6a29ad660eb867c9bbd2a2d152a8868cfa01f12be
MD5 470e3872fa4bf041c4f8c4e3a14eeefb
BLAKE2b-256 3d74c2690d8a3ed5cfac49ad69b35a75af1a440bbdc5ca9f30bc681f55e20cfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsbro-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dsbro-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2fd90b0cf621ae9785c9729a658680aef8257c0acad6a4b47d113e66943d361
MD5 35c103951d182586d99255e3154c30e5
BLAKE2b-256 4452d5d0973e42aafa1e7f54674c7849fe240b7077063786f5cdbbff1b1803c6

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