Why statistical plots reveal data patterns
📖 Scenario: You work as a data analyst for a small online store. You have sales data for different products over a week. You want to understand how sales vary and spot any patterns or trends.
🎯 Goal: Build a simple Python program that creates a dictionary of sales data, sets a threshold for high sales, filters the data, and then plots the sales using a bar chart to visually reveal patterns.
📋 What You'll Learn
Create a dictionary called
sales with product names as keys and sales numbers as valuesCreate a variable called
high_sales_threshold set to 50Use a dictionary comprehension to create a new dictionary
high_sales with only products having sales greater than high_sales_thresholdUse
matplotlib.pyplot to plot a bar chart of high_salesPrint the
high_sales dictionary💡 Why This Matters
🌍 Real World
Data analysts often use plots to quickly understand sales trends, customer behavior, or product popularity.
💼 Career
Knowing how to filter data and visualize it is a key skill for data science, business analysis, and reporting roles.
Progress0 / 4 steps