Ravindra Bagale · Data Scienceसर्व coursesया course चे lessonsशोधाEnglish

Data Science · मराठी आवृत्ती

27.4 Notebooks आणि diffs — outputs clear

By Ravindra Bagale

या course चे सर्व chapters (py + ch)

हे का शिकायचं?

Output cells मुळे Git diff अवाच्य. Commit आधी outputs clear करा (टीम नियम).

हे काय आहे?

Clear all outputs → save → commit. किंवा nbdime सारखे tools नंतर.

कसं करायचं?

Step 1. Outputs clear.

Step 2. Save.

Step 3. git diff पाहा — छोटा असावा.

Step 4. Commit message स्पष्ट.

उदाहरणं: copy करा आणि चालवा

उदाहरण A — What blows up diffs.

A seaborn chart PNG embedded in the notebook can be hundreds of KB per run. Code change was one filter line — diff looks like a novel.

उदाहरण B — Message after clear.

git add notebooks/01_clean.ipynb
git commit -m "Fix Pune city spelling in clean step"

उदाहरण C — Pair with outputs folder.

Save manager PNGs via savefig into outputs/ (Chapter 22). Commit the script/notebook logic; treat PNGs as optional artifacts.