ECON 3209 · Week 1, Lecture 1 · Kerala Agricultural University
Autumn 2026
By the end of this lecture, you will be able to:
numpy — fast numerical arrayspandas — data wranglingmatplotlib / seaborn — chartsstatsmodels — regression modelsscipy — statistical tests💡 Python is now the most popular language for data science worldwide — and is increasingly standard in economics research.
| Feature | Python | R | Stata | Excel |
|---|---|---|---|---|
| Free | ✅ | ✅ | ❌ | ❌ |
| General purpose | ✅ | ⚠️ | ❌ | ❌ |
| Data wrangling | ✅ | ✅ | ✅ | ⚠️ |
| Econometrics | ✅ | ✅ | ✅ | ❌ |
| Machine learning | ✅ | ✅ | ❌ | ❌ |
| Industry use | ✅ | ⚠️ | ❌ | ✅ |
For this course we use Python — the skills you learn generalise beyond economics to finance, data engineering, and research.
Scientific Stack - numpy — arrays & math - scipy — statistics - pandas — data tables - matplotlib — plotting - statsmodels — models
Working Environments - Jupyter Notebook — .ipynb files - JupyterLab — enhanced IDE - VS Code — popular editor - Spyder — MATLAB-like IDE - Google Colab — cloud notebooks
Try it now! Click ▶ Run below — Python runs directly in your browser. No installation needed.
A Jupyter Notebook has two types of cells:
# Heading, **bold**, *italic*$y = \beta_0 + \beta_1 x$Shift + Enter to runShortcut keys: Shift+Enter (run & advance) · Ctrl+Enter (run in place) · A (insert above) · B (insert below) · M (to markdown) · Y (to code)
Python follows standard BODMAS/PEMDAS rules:
print() FunctionInstallation (for home use)
numpy, pandas, matplotlib, statsmodels) are includedFor Google Colab (no install): colab.research.google.com
In Lectures
All slide decks run Python directly in your browser. No setup needed for class.
print() your name and semester✅ Python is free, powerful, and the #1 language for data science
✅ Jupyter Notebooks combine code, output, and explanatory text
✅ Python runs right in this browser — no install needed
✅ Key libraries: numpy · pandas · matplotlib · statsmodels
✅ Standard BODMAS order of operations applies in Python
✅ Comments (#) make code readable — use them generously
Lecture 2 — Variables & Data Types
We will cover: - Assigning and naming variables - Python’s core data types: int, float, str, bool - Lists, tuples, and dictionaries - Type conversion and checking
ECON 3209 — Kerala Agricultural University
Comments in Python