0
0
Data Analysis Pythondata~15 mins

Why Python is the top choice for data analysis in Data Analysis Python - See It in Action

Choose your learning style9 modes available
Why Python is the Top Choice for Data Analysis
📖 Scenario: Imagine you are a new data analyst at a company. Your manager asks you to understand why Python is the best tool for analyzing data. You will explore simple data and see how Python helps make data analysis easy and clear.
🎯 Goal: You will create a small data set, set a threshold to filter data, use a loop to find values above the threshold, and print the results. This will show why Python is great for data analysis.
📋 What You'll Learn
Create a dictionary with exact data values
Create a threshold variable
Use a for loop with specific variable names to filter data
Print the filtered results exactly
💡 Why This Matters
🌍 Real World
Data analysts often need to filter and summarize data quickly. Python lets them do this with simple code that is easy to read and change.
💼 Career
Knowing how to handle data with Python is a key skill for data analyst jobs. It helps you work efficiently and communicate results clearly.
Progress0 / 4 steps
1
Create the data dictionary
Create a dictionary called sales_data with these exact entries: 'January': 150, 'February': 200, 'March': 170, 'April': 220, 'May': 180.
Data Analysis Python
Need a hint?

Use curly braces {} to create a dictionary. Each entry has a month as a key and a number as a value.

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

Just assign the number 180 to the variable named threshold.

3
Filter months with sales above threshold
Create an empty list called high_sales_months. Use a for loop with variables month and sales to iterate over sales_data.items(). Inside the loop, add month to high_sales_months if sales is greater than threshold.
Data Analysis Python
Need a hint?

Remember to create an empty list first. Then use a for loop with the exact variable names. Use an if statement to check sales against threshold.

4
Print the filtered months
Write a print statement to display the high_sales_months list.
Data Analysis Python
Need a hint?

Use print(high_sales_months) to show the list of months with sales above 180.