Day 2: Setup: Python, Jupyter & Google Colab
✅ Today you will learn
- Choose your setup: Google Colab, Anaconda or plain Python
- Install pandas, NumPy, Matplotlib, Seaborn, scikit-learn
- Use Jupyter cells, Markdown and shortcuts
- Load the course datasets
- Run your first data notebook
🏢 In the real world
On day one at a data job you will get a laptop, access to a Jupyter or Colab workspace and a folder of CSV files. Being comfortable with notebooks is the very first skill every analyst uses daily.
Choose your setup
Google Colab (easiest)
- Runs in the browser – nothing to install
- Free GPU for deep learning
- Files saved in Google Drive
- Needs internet
Anaconda / Jupyter on your PC
- Works offline
- Full control of files and versions
- Same as most company laptops
- About 3 GB download
Beginners: start with Colab today and install Anaconda later. Both run exactly the same code.
Option 1 – Google Colab in 3 steps
- 1Open colab.research.google.com and sign in with your Gmail
- 2Click New notebook
- 3Type
print("Hello Data")in the cell and press Shift + Enter
from google.colab import files
uploaded = files.upload() # choose sales_data.csv
import pandas as pd
sales = pd.read_csv("sales_data.csv")
sales.head()Option 2 – Anaconda or plain Python
Anaconda (anaconda.com/download) installs Python, Jupyter and the main data libraries in one go. Or install Python 3 from python.org and run:
pip install jupyter pandas numpy matplotlib seaborn scikit-learn scipy plotly openpyxl jupyter notebook # opens Jupyter in your browser
Companies keep each project in its own environment: python -m venv ds-env, then activate it (ds-env\Scripts\activate on Windows, source ds-env/bin/activate on Mac/Linux) and pip install inside it.
Check your installation
import sys, numpy, pandas, matplotlib, seaborn, sklearn
print("Python :", sys.version.split()[0])
for lib in [numpy, pandas, matplotlib, seaborn, sklearn]:
print(f"{lib.__name__:12}:", lib.__version__)Your version numbers may be a little different – that is fine. Any recent version runs this course.
Jupyter notebook basics
| Shortcut | Action |
|---|---|
| Shift + Enter | Run cell and go to next |
| Esc then A / B | New cell above / below |
| Esc then M / Y | Change to Markdown / Code |
| Esc then D D | Delete cell |
| Tab | Auto-complete names |
| Shift + Tab | Show help of a function |
The course datasets
All 60 days use the same set of realistic Indian datasets. Download them once from the course kit and keep them in the same folder as your notebooks.
| File | Rows | Used for |
|---|---|---|
| sales_data.csv | 2,000 | Retail sales of an online store – pandas, EDA, charts |
| sales_dirty.csv | 312 | Data cleaning practice |
| students_performance.csv | 500 | Statistics, charts, mini project |
| house_prices.csv | 800 | Regression (price prediction) |
| loan_applications.csv | 1,200 | Classification (loan approval) |
| telecom_churn.csv | 3,000 | Major project – churn prediction |
| mall_customers.csv | 200 | Clustering (customer segments) |
| delhi_weather.csv | 1,096 | Time series & forecasting |
| product_reviews.csv | 600 | NLP – sentiment model |
| ab_test.csv | 4,000 | A/B testing |
| employees.csv, departments.csv | 30 / 5 | SQL joins and window functions |
Your first data notebook
import pandas as pd
students = pd.read_csv("students_performance.csv")
print("Rows and columns:", students.shape)
print(students.head())import pandas as pd
students = pd.read_csv("students_performance.csv")
print("Average maths marks :", round(students["maths"].mean(), 1))
print("Pass percentage :", round((students["result"] == "Pass").mean() * 100, 1), "%")
print("Top study hours :", students["study_hours"].max())It means Python cannot see the CSV. Keep the file in the same folder as the notebook, or give the full path like pd.read_csv("C:/data/sales_data.csv"). In Colab, upload the file first (see above).
🏅 Job skills unlocked today
Practice tasks
🏋️ Practice – do it yourself
day02_practice.ipynb. Add a Markdown heading “My first analysis” and one code cell that prints your name.house_prices.csv and print its shape and the first 3 rows.Show solution
import pandas as pd
houses = pd.read_csv("house_prices.csv")
print(houses.shape)
print(houses.head(3))house_prices.csv.Show solution
import pandas as pd
houses = pd.read_csv("house_prices.csv")
print("Highest price (lakh):", houses["price_lakh"].max())Quick quiz
🧠 Quick Quiz – test yourself
Interview corner
💼 Interview Corner
Why do data scientists use notebooks?
Notebooks mix code, output, charts and explanations in one document, which makes exploration fast and the analysis easy to share and review. For production code, the logic is later moved into .py files.
What is a virtual environment and why use it?
An isolated Python installation per project, so library versions of one project do not break another. Created with venv or conda, and listed in requirements.txt.
Summary
- Colab = zero install; Anaconda/Jupyter = offline and full control.
- Install libraries with pip install …; check versions with __version__.
- Shift + Enter runs a cell; Markdown cells tell the story.
- Keep the course CSV files next to your notebooks.
Day 3: Python basics for data – variables, data types, operators and f-strings with real numbers.
