0
0
Data Analysis Pythondata~30 mins

Python vs R vs Excel for analysis in Data Analysis Python - Hands-On Comparison

Choose your learning style9 modes available
Python vs R vs Excel for analysis
📖 Scenario: You work in a small business that tracks sales data. You want to understand how to use Python, R, and Excel to analyze this data and find the best tool for your needs.
🎯 Goal: Build simple data analysis examples in Python, R, and Excel to compare how each tool handles data setup, filtering, and summarizing.
📋 What You'll Learn
Create a sales data dictionary in Python
Set a sales threshold variable
Filter sales above the threshold using a dictionary comprehension
Print the filtered sales dictionary
💡 Why This Matters
🌍 Real World
Businesses often need to analyze sales data to find top-performing months or products. Knowing how to filter data quickly helps make better decisions.
💼 Career
Data analysts and business users use Python, R, or Excel to clean and analyze data. Understanding these tools helps pick the right one for the task.
Progress0 / 4 steps
1
DATA SETUP: Create sales data dictionary
Create a dictionary called sales with these exact entries: 'January': 1500, 'February': 1800, 'March': 1200, 'April': 2200, 'May': 1700
Data Analysis Python
Need a hint?

Use curly braces to create a dictionary with month names as keys and sales numbers as values.

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

Just assign the number 1600 to the variable named threshold.

3
CORE LOGIC: Filter sales above threshold
Use a dictionary comprehension to create a new dictionary called high_sales that contains only the months and sales from sales where the sales value is greater than threshold
Data Analysis Python
Need a hint?

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

4
OUTPUT: Print filtered sales
Print the high_sales dictionary
Data Analysis Python
Need a hint?

Use print(high_sales) to show the filtered dictionary.