Data Science · मराठी आवृत्ती
26.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
हे का शिकायचं?
एक sample JSON → DataFrame आणि एक zip CSV → DataFrame. दोन्ही सवयी.
हे काय आहे?
Practice + quiz.
कसं करायचं?
Step 1. Mock JSON list.
Step 2. DataFrame.
Step 3. Zip read.
Step 4. Quiz.
उदाहरणं: copy करा आणि चालवा
हा code / output:
import json
import zipfile
from pathlib import Path
import pandas as pd
Path("data/raw").mkdir(parents=True, exist_ok=True)
Path("outputs").mkdir(exist_ok=True)
payload = {
"orders": [
{"order_id": "BLK-61", "city": "Pune", "status": "Delivered", "amount_inr": 189},
{"order_id": "BLK-62", "city": "Nashik", "status": "Open", "amount_inr": 95},
{"order_id": "AMN-63", "city": "Kolhapur", "status": "Delivered", "amount_inr": 210},
{"order_id": "BLK-64", "city": "Solapur", "status": "Delivered", "amount_inr": 70},
{"order_id": "BLK-65", "city": "Nagpur", "status": "Open", "amount_inr": 150},
{"order_id": "BLK-66", "city": "Sambhaji Nagar", "status": "Delivered", "amount_inr": 120},
{"order_id": "BLK-67", "city": "Pune", "status": "Delivered", "amount_inr": 99},
{"order_id": "AMN-68", "city": "Nashik", "status": "Delivered", "amount_inr": 130},
]
}
Path("data/raw/status_sample.json").write_text(json.dumps(payload), encoding="utf-8")
df_api = pd.json_normalize(payload["orders"])
csv_path = Path("data/raw/orders_mini.csv")
df_api.to_csv(csv_path, index=False)
zip_path = Path("data/raw/orders_mini.csv.zip")
with zipfile.ZipFile(zip_path, "w", compression=zipfile.ZIP_DEFLATED) as z:
z.write(csv_path, arcname="orders_mini.csv")
df_zip = pd.read_csv(zip_path)
counts = df_zip.groupby("city", as_index=False).size().rename(columns={"size": "orders"})
counts.to_csv("outputs/api_zip_city_counts.csv", index=False)
print(df_api.shape, df_zip.shape)
print(counts)