Your task for today is to create a Python script that analyzes housing data from a CSV file. This project will give you hands-on practice with CSV reading, nested loops, and basic data analysis using Python's built-in tools.
📝 Project Task
The program should:
Load the file
sample_data/california_housing_test.csv located in the Colab Notebook files directory.
Parse each row and store the data in a list of dictionaries
Calculate and display:
The average median income
The average median house value
The highest income and the row it came from
The total population in rows where median income > 6
Bonus (optional):
Group rows by
housing_median_age
and calculate the average house value per ageLet the user enter a minimum income value and filter the dataset accordingly
This project teaches you how to work with CSV files, iterate over rows, and extract useful insights from real data — an essential step for any aspiring data analyst or Python developer.
📌 Expected Output
Loaded 3000 rows.
Average Median Income: 3.87
Average Median House Value: $156,831.00
Highest Income: 15.0001 (Row 456)
Total Population (income > 6): 982,135
💬 Join the Weekly Python Chat
Need help or want to share what you built? Join the Python Chat Thread to:
Ask questions
Share your solution
Get feedback
Find study partners
💻 Launch This Project in Colab
Open the interactive Google Colab notebook for today’s project — with full instructions, hints, and solutions.
Click the button below to start coding — no setup needed: