0
0
Data Analysis Pythondata~30 mins

Google Colab as alternative in Data Analysis Python - Mini Project: Build & Apply

Choose your learning style9 modes available
Using Google Colab as an Alternative for Data Analysis
📖 Scenario: You want to analyze sales data but do not have Python installed on your computer. Google Colab is a free online tool that lets you write and run Python code in your browser without installation.In this project, you will create a simple sales data dictionary, set a sales threshold, filter the sales above that threshold, and print the filtered results using Google Colab.
🎯 Goal: Build a small Python program in Google Colab that stores sales data, sets a sales threshold, filters sales above the threshold, and prints the filtered sales.
📋 What You'll Learn
Create a dictionary called sales with exact product names and sales numbers
Create a variable called threshold with a specific sales number
Use a dictionary comprehension to filter sales for products with sales above threshold
Print the filtered dictionary
💡 Why This Matters
🌍 Real World
Filtering sales data helps businesses focus on products that sell well. Google Colab allows you to do this analysis anywhere without installing software.
💼 Career
Data analysts and scientists often use online tools like Google Colab to quickly explore and analyze data before sharing results with teams.
Progress0 / 4 steps
1
Create the sales data dictionary
Create a dictionary called sales with these exact entries: 'Apples': 150, 'Bananas': 90, 'Cherries': 120, 'Dates': 60, 'Elderberries': 30.
Data Analysis Python
Need a hint?

Use curly braces {} to create a dictionary. Separate keys and values with a colon :. Separate items with commas.

2
Set the sales threshold
Create a variable called threshold and set it to 100.
Data Analysis Python
Need a hint?

Use a simple assignment statement to create the variable threshold.

3
Filter sales above the threshold
Use a dictionary comprehension to create a new dictionary called filtered_sales that contains only products from sales with sales greater than threshold. Use for product, amount in sales.items() in your comprehension.
Data Analysis Python
Need a hint?

Dictionary comprehension syntax: {key: value for key, value in dict.items() if condition}.

4
Print the filtered sales
Print the filtered_sales dictionary.
Data Analysis Python
Need a hint?

Use print(filtered_sales) to display the filtered dictionary.