Arithmetic operations on columns
📖 Scenario: You work in a small store and keep track of product prices and quantities sold in a table. You want to calculate the total sales amount for each product.
🎯 Goal: Create a pandas DataFrame with product data, set a tax rate, calculate total sales including tax for each product, and display the results.
📋 What You'll Learn
Create a pandas DataFrame with product names, prices, and quantities
Create a variable for the tax rate
Calculate total sales including tax for each product using arithmetic operations on columns
Print the resulting DataFrame with the new total sales column
💡 Why This Matters
🌍 Real World
Stores and businesses often calculate total sales including taxes to understand revenue.
💼 Career
Data analysts and data scientists use pandas to manipulate sales data and perform calculations for reports.
Progress0 / 4 steps