0
0
Data Analysis Pythondata~30 mins

Data analysis workflow (collect, clean, explore, visualize, conclude) in Data Analysis Python - Mini Project: Build & Apply

Choose your learning style9 modes available
Data analysis workflow (collect, clean, explore, visualize, conclude)
📖 Scenario: You work as a data analyst for a small online store. You have sales data that needs to be checked and understood before sharing insights with your team.
🎯 Goal: Build a simple data analysis workflow in Python to collect data, clean it, explore basic statistics, visualize sales trends, and draw conclusions.
📋 What You'll Learn
Create a dictionary with sales data including product names and sales numbers
Add a threshold variable to filter low sales
Use a dictionary comprehension to filter products with sales above the threshold
Print the filtered sales data
Use matplotlib to create a bar chart of filtered sales
💡 Why This Matters
🌍 Real World
Data analysts often need to collect raw data, clean it by filtering or correcting, explore it to find patterns, visualize results for easy understanding, and then share conclusions with others.
💼 Career
This workflow is a basic but essential skill for data analysts, business analysts, and anyone working with data to make informed decisions.
Progress0 / 4 steps
1
DATA SETUP: Create sales data dictionary
Create a dictionary called sales_data 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 colons.

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

Just assign the number 100 to the variable sales_threshold.

3
CORE LOGIC: Filter sales data above threshold
Use a dictionary comprehension to create a new dictionary called filtered_sales that includes only products from sales_data with sales greater than sales_threshold.
Data Analysis Python
Need a hint?

Use {product: sales for product, sales in sales_data.items() if sales > sales_threshold}.

4
OUTPUT: Print filtered sales and visualize
Print the filtered_sales dictionary. Then import matplotlib.pyplot as plt and create a bar chart showing product names on the x-axis and sales numbers on the y-axis using plt.bar(). Finally, call plt.show() to display the chart.
Data Analysis Python
Need a hint?

Use print(filtered_sales) and then create a bar chart with plt.bar() using keys and values from filtered_sales.