Day 53: Git, GitHub & Portfolio
✅ Today you will learn
- Why every data team uses Git
- The everyday commands: init, add, commit, push
- Branches, pull requests and merge
- Project structure and .gitignore for data
- A README and portfolio that get interviews
🏢 In the real world
A recruiter has 200 applications and 30 seconds for each. “Knows pandas” on a CV proves nothing; a GitHub link with four clean projects, readable READMEs and charts proves everything. Git is also how your future team will share and review your code every day.
Git in one picture
One-time setup
# install: https://git-scm.com (Windows: Git Bash) | check: git --version git config --global user.name "Your Name" git config --global user.email "you@example.com" git config --global init.defaultBranch main
A professional project structure
from pathlib import Path
root = Path("bazaarkart-sales-eda")
folders = ["data/raw", "data/processed", "notebooks", "src", "reports/figures", "app"]
for f in folders:
(root / f).mkdir(parents=True, exist_ok=True)
(root / "src" / "__init__.py").write_text("")
(root / "src" / "clean.py").write_text('''"""Reusable cleaning functions for BazaarKart data."""
import pandas as pd
def load_sales(path: str) -> pd.DataFrame:
df = pd.read_csv(path, parse_dates=["order_date"]).drop_duplicates()
df["revenue"] = df["quantity"] * df["unit_price"] * (1 - df["discount"])
return df
''')
(root / "requirements.txt").write_text("pandas==2.3.3\nmatplotlib==3.11.0\nseaborn==0.13.2\nscikit-learn==1.9.1\n")
(root / ".gitignore").write_text("__pycache__/\n.ipynb_checkpoints/\n.env\n*.joblib\ndata/raw/*.csv\n!data/raw/sample.csv\n")
for p in sorted(root.rglob("*")):
depth = len(p.relative_to(root).parts) - 1
print(" " * depth + ("📁 " if p.is_dir() else "📄 ") + p.name)Passwords, API keys and .env files must be in .gitignore – bots scan GitHub for leaked keys within minutes. Large or private CSVs should not be committed either; share a small sample and explain how to get the full data.
The everyday workflow
cd bazaarkart-sales-eda git init # start tracking this folder git status # what changed? git add README.md src/ notebooks/ # stage files git commit -m "Add cleaning function and EDA notebook" git log --oneline # history # connect to GitHub (create an empty repo on github.com first) git remote add origin https://github.com/<your-username>/bazaarkart-sales-eda.git git push -u origin main
| Command | Meaning |
|---|---|
| git status | Show changed / new files |
| git diff | Show line-by-line changes |
| git add file | Put a change in the next snapshot |
| git commit -m "msg" | Save the snapshot with a message |
| git log --oneline | List snapshots |
| git restore file | Undo uncommitted changes to a file |
| git pull | Get the latest from GitHub |
| git push | Send your commits to GitHub |
Write what and why in the present tense: “Add festive-season feature to churn model”, not “changes” or “final_final_v3”. Commit small, logical steps.
Branches and pull requests
git switch -c feature/add-rfm-segments # new branch for an experiment # ... edit, add, commit ... git push -u origin feature/add-rfm-segments # On GitHub: open a Pull Request → teammate reviews → "Merge" git switch main git pull # main now has the merged work
- 1Create a branch for one task
- 2Commit your work there
- 3Open a pull request
- 4Review and discuss
- 5Merge into main
A README recruiters read
from pathlib import Path
readme = """# 🛒 BazaarKart 2024 Sales Analysis
**Question:** What drove BazaarKart’s ₹68.8 lakh revenue in 2024, and where should we invest in 2025?
## 🔑 Key findings
| # | Finding | Recommendation |
|---|---------|----------------|
| 1 | Oct–Nov brought **27%** of revenue in 17% of the year | Plan stock & staff 6 weeks before Diwali |
| 2 | Mumbai, Bengaluru, Delhi = **43%** of revenue | Same-day delivery in these metros |
| 3 | Bigger discounts did **not** raise quantity or rating | Replace blanket discounts with A/B-tested offers |
| 4 | 25–34 year-olds paying by UPI are the core customer | UPI cashback instead of COD promotions |

## 🧰 Tools
Python · pandas · Matplotlib · Seaborn · SQL (SQLite)
## 📂 Structure
```
data/ raw and processed data (raw CSVs not committed)
notebooks/ 01_cleaning.ipynb, 02_eda.ipynb
src/ reusable functions (clean.py)
reports/ figures and the one-page summary
```
## ▶️ Run it
```bash
pip install -r requirements.txt
jupyter notebook notebooks/02_eda.ipynb
```
## 👤 Author
Your Name · [LinkedIn](https://www.linkedin.com/in/your-profile) · your.email@example.com
"""
Path("bazaarkart-sales-eda/README.md").write_text(readme, encoding="utf-8")
print(readme[:420] + "...")
print("README length:", len(readme.split()), "words")Your portfolio plan (from this course)
| Project | Shows | Course days |
|---|---|---|
| BazaarKart sales EDA | pandas, cleaning, EDA, storytelling | 15–19, 24 |
| HR / sales SQL warehouse | SQL joins, CTEs, window functions | 32–35 |
| A/B test of new checkout | Statistics, experiment design | 29–31 |
| Telecom churn prediction + app | ML pipeline, metrics, deployment | 56–60 |
Recruiters have seen the Titanic and Iris datasets a thousand times. Add your own question, a second dataset from data.gov.in or Kaggle (Indian data stands out), and your own recommendations.
### Hi, I'm Your Name 👋 Aspiring **Data Analyst / Data Scientist** · Python · SQL · Power BI · Machine Learning 📌 **Featured projects** - 🛒 [BazaarKart Sales EDA](https://github.com/<username>/bazaarkart-sales-eda) – festive season = 27% of revenue - 📞 [Telecom Churn Prediction](https://github.com/<username>/telecom-churn) – AUC 0.83, Streamlit app - 🧪 [Checkout A/B Test](https://github.com/<username>/checkout-ab-test) – +2.9 pp conversion, p = 0.006 📫 your.email@example.com · [LinkedIn](https://www.linkedin.com/in/your-profile)
🏅 Job skills unlocked today
Practice tasks
🏋️ Practice – do it yourself
bazaarkart-sales-eda folder and pin the repository on your profile.Quick quiz
🧠 Quick Quiz – test yourself
Interview corner
💼 Interview Corner
How do you version-control a data-science project?
Git for code, notebooks and small sample data; .gitignore for secrets and large data; requirements.txt for packages; data and models stored in cloud storage or tools like DVC; branches and pull requests for collaboration.
Walk me through one project on your GitHub.
Start with the business question, the data, your two or three key steps, the main result with a number, and what you would do next. Keep it under two minutes and have the README open.
Summary
- add → commit → push; status and log tell you where you are.
- Branches + pull requests = safe teamwork.
- Clean structure, .gitignore for secrets/data, requirements.txt.
- Four strong projects with business-first READMEs = your portfolio.
Day 54: resume, LinkedIn and job search – turn your projects into interview calls.
