Python Pandas Sales Data Analysis Project in Hindi

python-pandas-sales-data-analysis-project-hindi
📚 UPGK Online — Python Tutorials

🐼 Python Pandas Sales Data Analysis
Project in Hindi — Beginners के लिए

📅 UPGK Online 🏷 Python · Pandas · Data Science ⏱ 10 मिनट
क्या आप जानना चाहते हैं कि बड़ी कंपनियाँ अपने Sales Data को कैसे Analyze करती हैं? आज हम एक बेहद काम का Python Pandas Tutorial in Hindi लेकर आए हैं — जिसमें आप एक Real-Life Sales Data Analysis Project बनाना सीखेंगे, बिल्कुल शुरुआत से! 🚀

आज के दौर में Data Science की माँग बहुत तेज़ी से बढ़ रही है। हर छोटी-बड़ी कंपनी चाहती है कि उनके Products, Sales और Customers का Data सही तरीके से Analyze हो। लेकिन इसके लिए एक Powerful Tool चाहिए — और वो Tool है Python Pandas Library

अगर आप एक Student हैं और Python Course सीख रहे हैं, तो यह Pandas Project for Beginners आपके लिए बिल्कुल सही है। इस पोस्ट को पढ़ने के बाद आप खुद एक पूरा Data Analysis Project बना सकेंगे।


🎯 Project Goal — हम क्या सीखेंगे?

इस Sales Data Analysis Python Project में हम एक Simple CSV File का उपयोग करेंगे। इस प्रोजेक्ट में हम सीखेंगे कि Python Pandas का उपयोग करके Sales Data Analysis कैसे किया जाता है। हम इन सवालों के जवाब निकालेंगे:

  • Total Sales कितना है
  • Best Selling Product कौन सा है
  • Average Sales क्या है
  • High Performing Products कैसे filter करें
👉 यह प्रोजेक्ट Python Beginners के लिए बहुत उपयोगी है।

यह Python Project in Hindi आपको न केवल Pandas की Basics सिखाएगा, बल्कि Real-World Data के साथ काम करने का अनुभव भी देगा।


📁 Step 1 — Sample Dataset (sales.csv)

CSV (Comma-Separated Values) File एक Simple Text File होती है जिसमें Data Rows और Columns में लिखा होता है — बिल्कुल Excel Sheet की तरह।

नीचे दिया Data Copy करके sales.csv नाम से Save करें:

sales.csv
Product,Sales
A,100
B,150
C,200
A,120
B,180
C,220
ProductSales
A100
B150
C200
A120
B180
C220

💻 Step-by-Step Python Code

अब हम Step-by-Step Python Code लिखेंगे। पहले सुनिश्चित करें कि आपके Computer में Python 3 और Pandas Install है। Terminal में pip install pandas Type करें। पूरी Guide के लिए हमारे Study Material Page पर जाएँ।

02
🧠 Data Load करें — read_csv()
load_data.py
import pandas as pd

df = pd.read_csv("sales.csv")
print(df.head())
03
📊 Basic Analysis — sum, mean, max
basic_analysis.py
# Total Sales
print("Total Sales:", df["Sales"].sum())
# Average Sales
print("Average Sales:", df["Sales"].mean())
# Maximum Sale
print("Max Sale:", df["Sales"].max())
Total Sales
970
Avg Sales
161.7
Max Sale
220
04
📈 Group By — Product-wise Sales
groupby.py
# Group by product
grouped = df.groupby("Product")["Sales"].sum()
print(grouped)
OUTPUT
A
220
220
B
330
330
C
420
420
05
🏆 Best Selling Product — idxmax()
best_product.py
print("Best Product:", grouped.idxmax())
🏆
Best Selling Product
Product C
सबसे ज्यादा बिकने वाला Product — कुल 420 Sales
06
🔍 High Sales Filter करें (> 150)
filter.py
high_sales = df[df["Sales"] > 150]
print(high_sales)
IndexProductSales
2C200 ✓
4B180 ✓
5C220 ✓

* Condition है strictly > 150, इसलिए B=150 exclude होगा।

07
🧹 Clean Data
clean.py
df = df.drop_duplicates()
df["Sales"] = df["Sales"].fillna(df["Sales"].mean())
08
📊 Sort Data — Descending Order
sort.py
print(df.sort_values(by="Sales", ascending=False))

🧪
Final Combined Code
सब कुछ एक ही Script में — Copy करें और Run करें!
sales_analysis.py — COMPLETE
import pandas as pd

df = pd.read_csv("sales.csv")

# Total & average
print("Total Sales:", df["Sales"].sum())
print("Average Sales:", df["Sales"].mean())

# Group by product
grouped = df.groupby("Product")["Sales"].sum()
print("\nSales by Product:")
print(grouped)

# Best product
print("\nBest Product:", grouped.idxmax())

# High sales filter
print("\nHigh Sales:")
print(df[df["Sales"] > 150])
EXPECTED OUTPUT
Total Sales: 970
Average Sales: 161.66666666666666

Sales by Product:
Product
A    220
B    330
C    420
Name: Sales, dtype: int64

Best Product: C

High Sales:
  Product  Sales
2      C    200
4      B    180
5      C    220

📊 Output की जानकारी — Results समझें

कुल Sales 970 है। Product C सबसे आगे है — 420 की grouped Sales के साथ। Product B = 150 Filter में नहीं आया क्योंकि Condition strictly greater than है।

idxmax() Function ने हमें directly बता दिया कि Best Seller कौन है। यही Pandas Example in Hindi का Real Power है।


🚀 What You Learned

read_csv()CSV File को DataFrame में Load करना
sum() / mean()Aggregation — Totals और Averages
groupby()Category-wise Data Group करना
idxmax()Maximum Value की Row ढूंढना
FilteringBoolean Indexing से Data छाँटना
sort_values()Data को Sort करना

🌍 Real-Life Use Cases

🏪
Retail Business
Shopkeeper जान सकते हैं कि कौन सा Product सबसे ज्यादा बिकता है।
📈
Sales Tracking
Sales Manager Monthly Reports बनाने के लिए Pandas का उपयोग करते हैं।
🎓
Data Science Portfolio
Job Interview में यह Project दिखाकर अपनी Skills Prove करें।
🏦
Finance & Banking
Banks Transaction Data Analyze करने के लिए Pandas Use करती हैं।

🔚 Conclusion — आगे क्या करें?

आज हमने एक पूरा Python Pandas Tutorial in Hindi Complete किया — read_csv से लेकर sort_values तक।

अगर आप सच में Data Science में Career बनाना चाहते हैं, तो इस तरह के Hands-On Projects बनाते रहना बहुत ज़रूरी है। हर बड़ा Data Scientist एक बार Beginner था। 💪

और ऐसे Python Course और Study Material के लिए UPGK Online पर बने रहें।


❓ अक्सर पूछे जाने वाले सवाल (FAQ)

Q1. क्या Pandas सीखना मुश्किल है?
नहीं! अगर आपको Python की Basic Syntax आती है, तो Pandas सीखना बहुत आसान है। UPGK Online पर हमारे सभी Tutorials Beginner-Friendly हैं।
Q2. CSV की जगह Excel File भी Use कर सकते हैं?
बिल्कुल! Pandas में read_excel() Function से .xlsx Files पढ़ी जा सकती हैं। बस pip install openpyxl करें।
Q3. यह Project Run करने के लिए क्या चाहिए?
आपको Python 3.x और Pandas चाहिए। Terminal में pip install pandas Type करें। पूरी Installation Guide हमारे Study Material Page पर मिलेगी।
🚀 और ऐसे Python Projects सीखने के लिए
UPGK Online से जुड़े रहें!

टिप्पणियाँ

Top Quizzes

100 Hard Level UP GK & GS Quiz in Hindi 2026: सभी सरकारी परीक्षाओं के लिए महत्वपूर्ण प्रश्न

Top 50 Pattern Programming Questions with Python Solutions

Interesting GK Questions (AI & Modern)

Complete Data Engineering Roadmap for Beginners (Step-by-Step Guide for Students)

Computer GK Questions in Hindi 2026 – SSC, Railway, UP Police Important MCQ

GK Question || GK In Hindi || GK Question and Answer || GK Quiz

Python OOP Encapsulation Explained 🔐 | Private, Protected & Public Variables

UP GK Mock Test 2026: 100 qution उत्तर प्रदेश सामान्य ज्ञान महत्वपूर्ण प्रश्नोत्तरी