Data Science · मराठी आवृत्ती
28.7 Practice, tip आणि close
या course चे सर्व chapters (py + ch)
- How to Use This Free Data Science Course
- How to Install Python, Jupyter Notebook and VS Code for Data Science (Windows and Mac)
- Python Variables and Data Types Explained for Beginners (int, float, str, bool)
- Python Strings Tutorial: Slicing, f-strings and String Methods with Examples
- Python Lists, Tuples, Dictionaries and Sets Explained with Examples
- Python if, elif and else Statements with Real Examples for Beginners
- Python for Loops and while Loops Explained with Examples (range, break, continue)
- Python Functions Tutorial: def, return, Arguments and lambda with Examples
- Python Errors and Exceptions: How to Use try, except, else and finally
- How to Read and Write CSV, JSON and Text Files in Python (with open and with)
- Python Modules, pip and Virtual Environments (venv) Explained for Beginners
- Python Classes and Objects for Beginners: OOP Basics with Simple Examples
- NumPy Tutorial for Beginners: Arrays, Maths and Filtering in Python
- Python Mini Projects for Beginners: 5 Practice Projects Before Learning pandas
- Data Science vs Data Analytics Tutorial
- Python Jupyter Setup for Data Science
- Python Basics for Data Science Tutorial
- NumPy Essentials for Data Science Tutorial
- pandas DataFrames and Series Tutorial
- Filter and Sort Data in pandas Tutorial
- pandas GroupBy and Aggregations Tutorial
- Merge and Concat Data in pandas Tutorial
- Data Cleaning in pandas A–Z Tutorial
- Dates and Text in pandas – Free Tutorial
- Reshape Data: melt and pivot_table
- Exploratory Data Analysis in Python
- matplotlib Visualization Tutorial – Free
- seaborn Visualization Tutorial – Free
- Chart Choice and Data Storytelling
- Data Science Project: Blinkit Maharashtra
- Data Science Practice Exercises
- Data Science Interview Questions
- pandas matplotlib seaborn Cheat Sheet
- Data Science Glossary – Free Tutorial
- Stats for Data Work Mean Median IQR
- Export CSV Excel PNG from pandas Tutorial
- Common pandas Mistakes and Fixes Tutorial
- Load SQL Query Results into pandas DataFrame – Free Tutorial
- How to Rank and Running Totals in pandas
- How to Read APIs, JSON and Zipped CSVs into pandas
- How to Use Git with Jupyter Notebooks for Data Projects
- How to Merge and Join Tables in pandas for Blinkit Data
- What Is Machine Learning Simple Explanation
- Machine Learning Workflow Step by Step
- Train Test Split in Machine Learning sklearn
- Features and Labels in Machine Learning
- Linear Regression in Python with sklearn
- Classification with Logistic Regression in Python
- Decision Trees and Random Forests in Python
- K-Means Clustering in Python for Beginners
- How to Check If Your ML Model Is Good
- Overfitting and Underfitting in Machine Learning
- End-to-End ML Project India Dataset
- Data Preprocessing for ML: Impute Scale Encode
- What Is a Neural Network Simple Explanation
- Activation Loss Gradient Descent Plain English
- Backpropagation Intuition No Heavy Maths
- Install PyTorch and First Tensors
- Your First Neural Network in PyTorch
- Deep Learning vs Classical ML When to Use Which
- Convolutional Neural Networks CNNs for Images
- Small CNN Image Project in PyTorch
- What Transformers Are Text and Sequences
- Tiny Text Classifier Transformer Intro PyTorch
- What Is Natural Language Processing NLP
- Text Cleaning and TF-IDF in Python sklearn
- Sentiment Analysis Project in Python TF-IDF
- NLP vs ChatGPT Classical NLP and Generative AI
हे का शिकायचं?
दोन छोट्या tables left merge + indicator + एक anti-join यादी.
हे काय आहे?
Practice + quiz. या chapter नंतर joins बद्दल आत्मविश्वास.
कसं करायचं?
Step 1. left merge.
Step 2. indicator.
Step 3. left_only list.
Step 4. Quiz.
उदाहरणं: copy करा आणि चालवा
हा code / output:
from pathlib import Path
import pandas as pd
Path("outputs").mkdir(exist_ok=True)
orders = pd.DataFrame({
"order_id": [f"BLK-{i:03d}" for i in range(1, 11)],
"store_id": ["PUN-01", "PUN-01", "NSK-01", "KOP-01", "SLP-01",
"NGP-01", "PUN-01", "NSK-01", "BAD-01", "KOP-01"],
"rider_id": ["R-1", "R-2", "R-3", "R-1", "R-4", "R-5", "R-2", "R-3", "R-1", "R-4"],
"status": ["Delivered"] * 8 + ["Delivered", "Cancelled"],
"amount_inr": [64, 90, 58, 110, 70, 150, 200, 95, 80, 40],
})
stores = pd.DataFrame({
"store_id": ["PUN-01", "NSK-01", "KOP-01", "SLP-01", "NGP-01"],
"city": ["Pune", "Nashik", "Kolhapur", "Solapur", "Nagpur"],
"manager": ["Ravindra Bagale", "Shraddha Bagale", "Salman", "Raja", "Rani"],
})
riders = pd.DataFrame({
"rider_id": ["R-1", "R-2", "R-3", "R-4", "R-5"],
"rider_name": ["Zoya", "Amir", "Ruhi", "Ravina", "Shahrukh"],
})
assert stores["store_id"].is_unique and riders["rider_id"].is_unique
m = orders.merge(stores, on="store_id", how="left", indicator=True)
assert len(m) == len(orders)
print("store match", m["_merge"].value_counts().to_dict())
m = m.merge(riders, on="rider_id", how="left")
assert len(m) == len(orders)
delivered = m.loc[m["status"] == "Delivered"]
gmv = (
delivered.groupby(["city", "manager"], as_index=False)["amount_inr"]
.sum()
.sort_values("amount_inr", ascending=False)
)
gmv.to_csv("outputs/blinkit_join_gmv.csv", index=False)
print(gmv)
print("anti", m.loc[m["_merge"] == "left_only", ["order_id", "store_id"]])