6. Aggregate Functions & Groupby

  1. Find the total revenue generated from all transactions.

Solution
print(df['Total_Amount'].sum())

# Output
401978248.89447826
  1. Find the average value of the orders.

Solution
print(df['Total_Amount'].mean())

# Output
1367.6869831155632
  1. Find the highest sale value.

Solution
print(df['Total_Amount'].max())

# Output
4999.625796
  1. Find the lowest sale value.

Solution
  1. Find the average rating given by customers.

Solution
  1. Find the total number of products sold.

Solution
  1. Find the city and country with highest frequencies.

Solution
  1. Count the number of transactions per country wise.

Solution
  1. Find the total sales city wise.

Solution
  1. Find out average sales for every product category.

Solution
  1. Create a new dataset which contains the total sale value of each brand.

Solution
  1. Find out the highest average transaction value as per payment method.

Solution
  1. Find the total number of transactions for each shipping method.

Solution
  1. Find out the top sale from each country.

Solution
  1. Find out total number of transactions for each product category in every country.

Solution
  1. Find out the total number of transactions for each payment method for every country.

Solution

Last updated