Data Science Pipeline — Hands-on with Google Colab
Welcome to the Data Science Pipeline Faculty Development Program session! This pre-read document will prepare you for a completely hands-on, no-installation-needed workshop.
A Data Science Pipeline is the end-to-end process of taking raw data and transforming it into actionable insights. The standard pipeline has these stages:
Google Colaboratory (Colab) is a free, cloud-based Jupyter notebook environment that runs entirely in your browser. No installation. No setup.
colab.research.google.com.ipynb file we share during the session| Cell Type | Use | Example |
|---|---|---|
| Code Cell | Runs Python code | print("Hello") |
| Text Cell | Markdown documentation | Explanations, headings |
Categorical data represents groups or categories rather than numbers. Examples: Department (Science, Commerce), Gender (Male, Female), or Favorite Color (Red, Blue, Green).
Machine learning models understand only numbers. So we must convert text categories to numbers. This is called encoding.
If we encode Red=1, Blue=2, Green=3, the model might think Green > Blue > Red (i.e., order/ranking). But colors have no inherent order. This is why we use one-hot encoding.
One-hot encoding creates a separate column for each category, with 1 (present) or 0 (absent).
| Original | Red | Blue | Green | Yellow |
|---|---|---|---|---|
| Red | 1 | 0 | 0 | 0 |
| Blue | 0 | 1 | 0 | 0 |
| Green | 0 | 0 | 1 | 0 |
| Yellow | 0 | 0 | 0 | 1 |
In Python with pandas, it's just one line:
import pandas as pd encoded = pd.get_dummies(df['Favorite_Color'], prefix='Color')
During the session, we will use a dataset about college student stress levels. This dataset is specially designed to be relatable for faculty members.
| Feature | Type | Description | Example |
|---|---|---|---|
| Department | Categorical | Student's department | Science, Arts, Commerce, Engineering |
| Attendance Level | Categorical | Attendance category | Regular, Irregular, Borderline |
| Favorite Color | Categorical | Self-reported favorite color 🌈 | Red, Blue, Green, Yellow, Purple, Orange |
| Weekly Study Hours | Numerical | Hours studied per week | 2 – 25 hours |
| Assignment Submission % | Numerical | Assignment submission rate | 40% – 100% |
| Backlogs Count | Numerical | Number of pending backlogs | 0 – 5 |
| Stress Level | Binary (Target) | 0 = Low Stress, 1 = High Stress | 0 or 1 |
Total: ~55 minutes
| Action | Shortcut |
|---|---|
| Run current cell | Shift + Enter |
| Add a code cell | Click + Code button |
| Add a text cell | Click + Text button |
| Delete a cell | Click cell → Trash icon (top-right) |
| Toggle cell output | Double-click output area |
| Command | What it does |
|---|---|
df.head() | Show first 5 rows of data |
df.info() | Show data types and missing values |
df.describe() | Show statistical summary |
df['col'].value_counts() | Count unique values in a column |
pd.get_dummies() | One-hot encode categorical columns |
train_test_split() | Split data into train/test |
RandomForestClassifier() | Create a Random Forest model |
accuracy_score() | Calculate model accuracy |
Data Science Pipeline • 30 May 2026 • JIET Jodhpur
Kapil Panwar
Gyannetra Pvt Ltd, Pune, Maharashtra
Gyannetra — India's Premier AI Consultancy