Turn Your Study Data into a Python Analysis

Computer Science

Turn Your Study Data into a Python Analysis

Turn Your Study Data into a Python Analysis

You already know the basic Python building blocks, so this course will use them immediately instead of reteaching syntax. You will build a reusable study-session analysis that reads a CSV, cleans real-world data, answers useful questions with pandas, and produces a clear report with charts. The finished project is a runnable Python script that accepts your study-session CSV and outputs summaries of time spent, subjects, completion rates, and trends, plus saved visualizations you can show.

4 modules14 lessonsComputer Science

What you learn by building this

Build it yourself, get guided when you are stuck, and leave with proof you can actually show.

Learning Journey

1

From CSV File to First Findings

3 lessons

Use familiar Python variables, functions, and control flow to create the project, load tabular data, and produce its first useful analysis.

2

Clean Data and Ask Better Questions

4 lessons

Turn imperfect rows into trustworthy data, then use filtering, new columns, and grouping to answer concrete questions about the learner's study habits.

3

Build a Reliable Analysis Pipeline

4 lessons

Organize the growing analysis into reusable steps and add date-based and comparative findings without introducing a second major framework.

4

Show the Results Clearly

3 lessons

Turn the trustworthy analysis into a small report with visual evidence, then polish the command and outputs so the project is ready to run or demonstrate.

Public lesson

Set up the study-session analysis

Tasks

1. Create the project folder

In your terminal, run:

mkdir -p study-session-analysis/data
cd study-session-analysis

Tasks

Check that you are in the new folder:

pwd

The final part of the printed path should be:

study-session-analysis

Tasks

2. Create the starter CSV

Inside study-session-analysis/data, create a file named sessions.csv with this content:

date,subject,minutes,focus_score,notes
2026-07-20,React,45,4,Built a card component
2026-07-21,CSS,30,3,Practiced selectors
2026-07-22,Python,25,5,Reviewed file handling

The first row is the header: it names the information each later row contains.

Tasks

Check the file from the project folder:

cat data/sessions.csv

You should see the header and three study sessions.

Tasks

3. Create the Python file

Create a file named analyze.py in the project folder. Start with this skeleton:

DATA_FILE = "TODO"

print("Study-session analysis starting")
print(f"Analyzing: {DATA_FILE}")

Tasks

Replace "TODO" with the relative path to your CSV file. Do not use an absolute path from your computer; the project should still work if the whole folder is moved.

Your finished file should contain the correct path in a line shaped like this:

DATA_FILE = "your-relative-path-here"

The two print lines are already provided because they are simple command-line status messages. Your part is connecting the program to the file you created.

Tasks

4. Run the program

From inside study-session-analysis, run:

python analyze.py

If your computer uses python3 for Python, run:

python3 analyze.py

The output should clearly identify both the program and the file, similar to:

Study-session analysis starting
Analyzing: data/sessions.csv

The exact first line must be:

Study-session analysis starting

The second line must contain:

data/sessions.csv

Find the bug

Something's wrong — can you spot it?

If you see TODO, the path in analyze.py has not been replaced yet. If you see a file-not-found error, check that:

  • you ran the command from inside study-session-analysis
  • the file is named exactly sessions.csv
  • the path uses data/sessions.csv

Tasks

Checkpoint

Your project should now have this shape:

study-session-analysis/
├── analyze.py
└── data/
    └── sessions.csv

Run the program once more after checking the structure. It is ready for the next step when it prints the starting message and the CSV path without an error.

Course Outline

4 modules · 14 lessons

From CSV File to First Findings

Clean Data and Ask Better Questions

Build a Reliable Analysis Pipeline

Show the Results Clearly

Learn by building your own version.

Remix this public project to open the workspace, follow the guided build, and let the AI mentor teach you through the work instead of doing it for you.