Objective:

Learn how to add a new column to a DataFrame by performing a calculation on an existing column.


Task:

  1. Add a new column named Taxed Purchase to the DataFrame.

  2. Calculate the 5% tax on the Purchase Amount (USD) column and store the result in the new column.

  3. Print the first 10 rows to verify the new column.

Python Code:


df['Taxed Purchase'] = df['Purchase Amount (USD)'] * 1.05

df.head(10)