A structured, self-paced Python learning repository — from absolute basics to data science and beyond.
| # | Chapter | Topics Covered |
|---|---|---|
| 01 | Intro To Python - 1 | Setup, syntax, variables, data types, input/output |
| 02 | Intro To Python - 2 | Type casting, comments, keywords, naming conventions |
| 03 | Operators | Arithmetic, comparison, logical, bitwise, assignment operators |
| 04 | Strings | String methods, slicing, formatting, indexing |
| 05 | Data Structures - 1 | Lists, Tuples — creation, indexing, methods |
| 06 | Data Structures - 2 | Sets, Dictionaries — operations and methods |
| 07 | Conditional STMT | if, elif, else, nested conditions |
| 08 | Looping Stmt | for loop, while loop, nested loops |
| 09 | Control Transfer Stmts | break, continue, pass |
| 10 | Functions | def, return, *args, **kwargs, lambda, recursion |
| 11 | Exception Handling | try, except, finally, raise, custom exceptions |
| 12 | Modules | import, built-in modules, custom modules, packages |
| 13 | File Handling | Read, write, append files; context managers |
| 14 | NumPy - I | Arrays, array operations, indexing, slicing |
| 15 | NumPy - II | Mathematical ops, broadcasting, reshaping, aggregations |
| 16 | Pandas - I | Series, DataFrames, reading CSV/Excel, basic operations |
| 17 | Pandas - II | Filtering, groupby, merging, joining DataFrames |
| 18 | Pandas - III | Data cleaning, handling nulls, apply, pivot tables |
| 19 | Matplotlib & Seaborn | Line, bar, pie, scatter plots; heatmaps, pairplots |
| 20 | OOPs | Classes, objects, inheritance, polymorphism, encapsulation |
| 21 | Database Connectivity | MySQL/SQLite connection, CRUD operations with Python |
| 🦠 | Case Study — COVID | Real-world data analysis using COVID-19 dataset |
| 📝 | Python Test | Practice tests and assessments |
| 📅 | Weekly | Weekly exercises and revision tasks |
| Tool / Library | Purpose |
|---|---|
| Python 3.x | Core language |
| Jupyter Notebook | Interactive coding environment |
| NumPy | Numerical computing |
| Pandas | Data manipulation |
| Matplotlib | Data visualization |
| Seaborn | Statistical visualization |
| SQLite / MySQL | Database connectivity |
- What is Python?
- Python Features (Simple, Interpreted, Open Source, Portable, etc.)
- Python vs Other Languages & Tools (Java, R, Excel, etc.)
- Python Applications — Web, Automation, AI/ML, Data Analytics
- Python's Role in Data Analytics & Data Science
- Installing Python & Setting Up the Environment (Anaconda / pip)
- Introduction to Jupyter Notebook
- Writing & Running Your First Python Program
- Variables — Declaration, Assignment, Naming Rules
- Python Data Types —
int,float,complex,str,bool,NoneType type()andisinstance()functions- Type Casting —
int(),float(),str(),bool() input()andprint()functions- Python Keywords & Reserved Words
- Comments — Single-line (
#) and Multi-line (''') - Naming Conventions & PEP 8 Basics
- Dynamic Typing in Python
- Arithmetic Operators —
+,-,*,/,//,%,** - Comparison / Relational Operators —
==,!=,>,<,>=,<= - Logical Operators —
and,or,not - Assignment Operators —
=,+=,-=,*=,/=,//=,**= - Bitwise Operators —
&,|,^,~,<<,>> - Identity Operators —
is,is not - Membership Operators —
in,not in - Operator Precedence & Associativity
- String Creation & Literals
- String Indexing (Positive & Negative)
- String Slicing —
str[start:stop:step] - String Immutability
- String Methods —
upper(),lower(),strip(),lstrip(),rstrip(),replace(),split(),join(),find(),count(),startswith(),endswith() - String Formatting —
f-strings,.format(),%operator - Escape Characters —
\n,\t,\\ - Raw Strings —
r"..." - Multi-line Strings
Lists
- Creating Lists, Nested Lists
- Indexing & Slicing
- List Methods —
append(),insert(),remove(),pop(),sort(),reverse(),copy(),extend(),count(),index() - List Comprehensions
- Mutable Nature of Lists
Tuples
- Creating Tuples, Single-element Tuples
- Indexing & Slicing
- Tuple Methods —
count(),index() - Tuple Unpacking / Packing
- Immutability — Why Tuples over Lists?
Sets
- Creating Sets, Empty Sets
- Set Methods —
add(),remove(),discard(),pop(),clear() - Set Operations — Union (
|), Intersection (&), Difference (-), Symmetric Difference (^) - Frozensets
Dictionaries
- Creating Dictionaries, Nested Dictionaries
- Accessing & Modifying Values
- Dictionary Methods —
get(),update(),keys(),values(),items(),pop(),setdefault() - Dictionary Comprehensions
- Iterating Over Dictionaries
ifStatementif-elseStatementif-elif-elseLadder- Nested
ifConditions - Ternary / Inline Conditional Expressions —
x if condition else y - Truthiness & Falsy Values in Python
- Practical Examples — Grade system, eligibility checks, etc.
forLoop — Iterating over Lists, Strings, Tuples, Rangesrange()Function —start,stop,stepwhileLoop — Condition-based Iteration- Nested Loops
enumerate()— Loop with Indexzip()— Iterate over Multiple Iterables- Looping with Dictionaries
break— Exit a Loop Prematurelycontinue— Skip to the Next Iterationpass— Placeholder / Empty Blockelsewith Loops (for-else / while-else)- Practical Use Cases and Examples
- Defining Functions with
def - Function Parameters & Return Values
- Default Arguments
- Keyword Arguments (
kwargs) - Variable-length Arguments —
*argsand**kwargs - Lambda (Anonymous) Functions
- Recursive Functions
- Scope — Local, Global,
globalkeyword map(),filter(),reduce()- Docstrings & Function Documentation
- Types of Errors — Syntax, Runtime, Logical
tryandexceptBlocks- Handling Specific Exceptions —
ValueError,TypeError,ZeroDivisionError,FileNotFoundError,IndexError,KeyError elseBlock in Exception HandlingfinallyBlock — Always Executes- Raising Exceptions with
raise - Custom / User-Defined Exceptions
- Best Practices for Error Handling
- What is a Module?
importStatement andfrom...importimport ... asAliasing- Built-in Modules —
math,random,datetime,os,sys,time - Creating Custom Modules
__name__ == "__main__"Pattern- Python Packages &
__init__.py - Installing Third-party Packages with
pip
- Opening Files —
open()function - File Modes —
r,w,a,r+,rb,wb - Reading Files —
read(),readline(),readlines() - Writing & Appending to Files
- Context Manager —
with open(...) as f - Working with CSV Files using
csvmodule - File & Directory Operations with
osmodule - Handling File-related Exceptions
- What is NumPy? Why use it over Python Lists?
- Installing & Importing NumPy
- Creating Arrays —
np.array(),np.zeros(),np.ones(),np.full(),np.arange(),np.linspace() - Array Attributes —
shape,dtype,ndim,size,itemsize - 1D, 2D, and 3D Arrays
- Array Indexing & Slicing
- Array Data Types & Type Conversion
- Element-wise Arithmetic Operations
- Broadcasting — Rules and Examples
- Reshaping & Transposing —
reshape(),flatten(),.T - Stacking & Splitting —
hstack(),vstack(),split() - Mathematical Functions —
np.sqrt(),np.exp(),np.log() - Statistical Functions —
np.sum(),np.mean(),np.std(),np.min(),np.max(),np.median() - Boolean Masking & Fancy Indexing
- Sorting Arrays —
np.sort(),np.argsort() - Random Module —
np.random.rand(),np.random.randint(),np.random.seed()
- What is Pandas? Why use it?
Series— Creation, Indexing, OperationsDataFrame— Creation, Structure, Attributes- Reading Data —
pd.read_csv(),pd.read_excel() - Exploring DataFrames —
head(),tail(),info(),describe(),shape,columns,dtypes - Selecting Columns — Single & Multiple
- Row Selection —
loc[]andiloc[] - Adding & Dropping Columns and Rows
- Sorting —
sort_values(),sort_index()
- Filtering Rows with Conditions
- Multiple Conditions —
&,|,~ groupby()— Grouping and Aggregation (sum,mean,count,max,min)- Merging DataFrames —
pd.merge()(inner, outer, left, right joins) - Joining DataFrames —
join() - Concatenating —
pd.concat()(axis 0 & 1) - Pivot Tables —
pd.pivot_table() - Cross Tabulation —
pd.crosstab()
- Identifying Missing Values —
isnull(),notnull(),isna() - Handling Missing Values —
dropna(),fillna() - Removing Duplicates —
duplicated(),drop_duplicates() - Applying Functions —
apply(),map(),applymap() - String Operations on Columns —
str.upper(),str.contains(),str.replace(),str.split() - DateTime Handling —
pd.to_datetime(),dtaccessor - Renaming Columns —
rename() - Changing Data Types —
astype() - Exporting Data —
to_csv(),to_excel()
Matplotlib
- Figure and Axes —
plt.figure(),plt.subplot() - Line Plot —
plt.plot() - Bar Chart —
plt.bar(),plt.barh() - Scatter Plot —
plt.scatter() - Histogram —
plt.hist() - Pie Chart —
plt.pie() - Titles, Labels, Legends, Grid —
plt.title(),plt.xlabel(),plt.legend() - Saving Figures —
plt.savefig()
Seaborn
sns.heatmap()— Correlation Matrix Visualizationsns.pairplot()— Pairwise Relationshipssns.boxplot()andsns.violinplot()— Distributionsns.barplot()andsns.countplot()sns.histplot()andsns.kdeplot()- Seaborn Themes & Color Palettes
- Introduction to OOP — Why OOP?
- Classes & Objects
__init__()Constructor- Instance Variables vs Class Variables
- Instance Methods, Class Methods (
@classmethod), Static Methods (@staticmethod) - Inheritance — Single, Multi-level, Multiple
super()Function- Polymorphism — Method Overriding, Duck Typing
- Encapsulation — Private (
__) and Protected (_) Members - Abstraction —
ABCmodule - Dunder / Magic Methods —
__str__(),__repr__(),__len__(),__add__()
- Introduction to Databases — Relational DB Concepts
- Connecting Python to SQLite —
sqlite3module - Connecting Python to MySQL —
mysql-connector-python - Creating a Database & Tables
- CRUD Operations:
INSERT— Adding recordsSELECT— Fetching records with conditionsUPDATE— Modifying recordsDELETE— Removing records
- Using Cursors —
cursor.execute(),fetchall(),fetchone() - Commit & Rollback — Transaction Management
- Closing Connections Safely
- Parameterized Queries — Preventing SQL Injection
- Loading the COVID-19 Dataset
- Data Exploration & Understanding
- Cleaning & Preprocessing with Pandas
- Country-wise / Date-wise Analysis
- Trend Visualization using Matplotlib & Seaborn
- Key Insights & Conclusions
- Chapter-wise Assessments
- Coding Challenges
- MCQ-style Revision Questions
- Weekly Practice Problems
- Revision Notebooks
- Progressive Difficulty Exercises
-
Clone the repository
git clone https://github.com/sachinkhote/Python-Learnings.git cd Python-Learnings -
Open any chapter in Jupyter Notebook
jupyter notebook
-
Follow chapters in order — especially for the first 13 chapters (core Python)
-
Libraries chapters (14–19) can be explored independently once core Python is done
Basics → Chapters 01–04
Data Structures → Chapters 05–06
Control Flow → Chapters 07–09
Functions → Chapter 10
Error Handling → Chapter 11
Utilities → Chapters 12–13
─────────────────────────────────
Data Science → Chapters 14–19
OOP → Chapter 20
Databases → Chapter 21
─────────────────────────────────
Apply It All → COVID Case Study
This repository is dedicated to personal learning. Happy coding! 🎯