🌐 Detecting your location…

পাইথন পান্ডাস টিউটোরিয়াল 2026: বেসিক থেকে বাস্তব প্রকল্পে ডেটা বিশ্লেষণ

⏱️2 min read  ·  318 words
Python Pandas Tutorial 2026: Data Analysis from Basics to Real Projects

পান্ডা2026 সালে ডেটা বিশ্লেষণের জন্য সবচেয়ে বেশি ব্যবহৃত পাইথন লাইব্রেরি। আপনি CSV পরিষ্কার করছেন, বিক্রয় ডেটা একত্রিত করছেন বা মেশিন লার্নিংয়ের জন্য ডেটাসেট প্রস্তুত করছেন, পান্ডাস হল হাতিয়ার। এই টিউটোরিয়ালটি প্রয়োজনীয় ক্রিয়াকলাপ কভার করে প্রতিটি ডেটা পেশাদারের প্রয়োজন।

ইনস্টল করুন এবং আমদানি করুন

pip install pandas numpy

import pandas as pd
import numpy as np

print(pd.__version__)  # 2.2+

ডেটাফ্রেম তৈরি করা হচ্ছে

# From dict
df = pd.DataFrame({
    'name':   ['Alice', 'Bob', 'Carol', 'Dave'],
    'age':    [25, 30, 35, 28],
    'salary': [70000, 85000, 92000, 78000],
    'dept':   ['Eng', 'Mktg', 'Eng', 'HR'],
})

# From CSV
df = pd.read_csv('data.csv')

# From JSON
df = pd.read_json('data.json')

print(df.head())       # First 5 rows
print(df.info())       # Column types and nulls
print(df.describe())   # Stats summary

ডেটা নির্বাচন করা হচ্ছে

# Select column
df['name']              # Series
df[['name', 'salary']]  # DataFrame

# Select rows by condition
df[df['salary'] > 80000]
df[(df['dept'] == 'Eng') & (df['age'] < 35)]

# iloc — by position
df.iloc[0]       # First row
df.iloc[1:3]     # Rows 1-2

# loc — by label
df.loc[df['dept'] == 'Eng', ['name', 'salary']]

ডেটা পরিষ্কার করা

# Check nulls
df.isnull().sum()

# Drop rows with any null
df.dropna(inplace=True)

# Fill nulls
df['salary'].fillna(df['salary'].mean(), inplace=True)

# Remove duplicates
df.drop_duplicates(inplace=True)

# Rename columns
df.rename(columns={'name': 'full_name'}, inplace=True)

# Change dtype
df['age'] = df['age'].astype(int)

গ্রুপিং এবং একত্রিতকরণ

# Group by department, get stats
summary = df.groupby('dept').agg(
    count=('name', 'count'),
    avg_salary=('salary', 'mean'),
    max_salary=('salary', 'max'),
).reset_index()

print(summary)
#   dept  count  avg_salary  max_salary
#   Eng       2     81000.0       92000
#   HR        1     78000.0       78000
#   Mktg      1     85000.0       85000

ডেটাফ্রেম একত্রিত করা

# Two DataFrames
employees = pd.DataFrame({'emp_id': [1,2,3], 'name': ['Alice','Bob','Carol']})
salaries  = pd.DataFrame({'emp_id': [1,2,4], 'salary': [70000,85000,60000]})

# Inner join (only matching)
merged = employees.merge(salaries, on='emp_id', how='inner')

# Left join (keep all employees)
merged = employees.merge(salaries, on='emp_id', how='left')

কার্যাবলী প্রয়োগ করা

# Apply function to column
df['salary_band'] = df['salary'].apply(
    lambda s: 'High' if s > 90000 else ('Mid' if s > 75000 else 'Low')
)

# Apply to multiple columns
df[['age','salary']].apply(lambda col: col / col.max())

# Vectorized operations (faster than apply)
df['salary_k'] = df['salary'] / 1000
df['senior'] = df['age'] >= 30

রপ্তানি ফলাফল

df.to_csv('output.csv', index=False)
df.to_excel('output.xlsx', index=False)
df.to_json('output.json', orient='records')

উপসংহার

পান্ডা 95% বাস্তব-বিশ্বের ডেটা র্যাংলিং টাস্ক পরিচালনা করে। মাস্টারgroupby,merge, এবং ভেক্টরাইজড অপারেশন এবং আপনি সেকেন্ডের মধ্যে লক্ষ লক্ষ সারি প্রক্রিয়া করবেন। ভিজ্যুয়ালাইজেশনের জন্য Matplotlib বা Plotly এর সাথে একত্রিত করুন, অথবা ML-এর জন্য স্কিট-লার্নের জন্য পরিষ্কার করা ডেটা হ্যান্ড অফ করুন।

MD Rafikul Islam

Written by

MD Rafikul Islam is a software developer and the editor of TechPulse. He writes about developer tooling, hardware, and the practical decisions that come up in day-to-day engineering work — which laptop to buy, which framework to commit to, why a build broke at 2am. He tests the tools he writes about and says plainly when something is not worth the money. Corrections and corrections requests are welcome at rony.yf25@gmail.com.

✍️ Leave a Comment

Your email address will not be published. Required fields are marked *

🌐 Read in:🇬🇧 English🇩🇪 Deutsch🇧🇷 Português🇸🇦 العربية🇮🇳 हिन्दी🇧🇩 বাংলা