Skip to main content

Your Data Science Bro. One import away.

Project description

dsbro logo

dsbro

CI Python 3.9+ License: MIT PyPI version Downloads

Your Data Science Bro. One import away.

dsbro is an all-in-one Python library for notebook-first data science. It pulls together setup, file I/O, EDA, preprocessing, visualization, metrics, ML baselines, and text helpers into one import with smart defaults and dark-theme visuals.

Installation

pip install dsbro
pip install dsbro[ml]
pip install dsbro[all]

Quick Start

import dsbro
dsbro.setup()
print(dsbro.version())
dsbro.about()
from dsbro import eda
eda.overview(df)
from dsbro import prep
df_small = prep.reduce_memory(df)
df_clean = prep.fill_missing(df)
from dsbro import viz
viz.set_theme("dark")
viz.heatmap(df.corr(numeric_only=True))
from dsbro import ml
results = ml.compare(df, target="target", cv=3)
results.head()
from dsbro import metrics
metrics.regression_report(y_true, y_pred)

Modules

Module What it does
utils Notebook setup, seeding, timers, system info, and environment helpers
io File loading, saving, peeking, searching, and submission utilities
eda Dataset overview, missing values, correlation, outliers, drift, and profiling
prep Encoding, scaling, missing-value handling, feature engineering, and memory reduction
viz Dark-theme charts for tabular analysis and model evaluation
metrics Quick regression and classification metrics in one place
ml Model comparison, training, tuning, blending, stacking, and OOF utilities
text Text cleaning, tokenization, n-grams, word frequency, and TF-IDF features

Why dsbro?

  • You stop copy-pasting the same notebook boilerplate for setup, missing values, scaling, and memory reduction.
  • You get cleaner charts without writing styling code every time.
  • You avoid scattered imports across pandas, seaborn, sklearn, and utility snippets.
  • You can benchmark baseline models in one line instead of wiring cross-validation by hand.
  • You keep common Kaggle and Colab workflows in one small, consistent package.

For Kaggle Users

Use dsbro to replace the usual notebook starter blocks:

!pip install dsbro[all] -q

import dsbro
dsbro.setup()

Useful first calls:

from dsbro import eda, prep, ml
eda.profile(train_df, target="target")
train_small = prep.reduce_memory(train_df)
leaderboard = ml.compare(train_small, target="target", cv=3)

For Colab Users

Install in the first cell, then keep the rest of the notebook clean:

!pip install dsbro[all] -q

import dsbro
dsbro.setup()

Colab-friendly flow:

from dsbro import io, eda, viz
data = io.load("/content/train.csv")
eda.overview(data)
viz.hist(data, col="target")

Dependencies

Core dependencies:

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • scikit-learn

Optional extras:

  • dsbro[ml]: lightgbm, xgboost, catboost, optuna
  • dsbro[plotly]: plotly
  • dsbro[all]: all optional extras together

Notebook Example

The project includes a proper tutorial notebook:

Development

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

Contributing

We welcome contributions. Read CONTRIBUTING.md before opening a PR.

License

MIT. See LICENSE.

Author

Muhammad Ibrahim Qasmi
Website
GitHub

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsbro-0.2.1.tar.gz
  • Upload date:
  • Size: 205.2 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.1.tar.gz
Algorithm Hash digest
SHA256 269fbc6d6cc25f9c00acd5f37d7c3a4f73e2fb1dffb5b4cca15cdfd4c33afa6b
MD5 10f22231570047dc5f889ff736e52858
BLAKE2b-256 b37dc2981afee1cad695abdf54441c0fc1802d56043d5590fbefcd2f1b2a952d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsbro-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 51.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dff816d390cef1dd0635a84b88d53e8bb8ea224963448ab9542804c54b89c0ed
MD5 f6c60442d3e9ae79d5be6f775f62e4b4
BLAKE2b-256 84cf56e477ed1c873926ba4ced7b6f1e265da67c11155a17fc44b0a5bcb7c319

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