Creating new columns
📖 Scenario: You work in a small store that keeps track of products and their prices. You want to add new information to your data to help with sales.
🎯 Goal: Create a new column in a pandas DataFrame that shows the price after a 10% discount.
📋 What You'll Learn
Create a pandas DataFrame with product names and prices
Create a variable for the discount rate
Add a new column with discounted prices using the discount rate
Print the updated DataFrame
💡 Why This Matters
🌍 Real World
Stores often need to update prices with discounts or taxes to help customers and manage sales.
💼 Career
Data analysts and data scientists use pandas to prepare and analyze sales data, including creating new columns for calculations.
Progress0 / 4 steps