(Python) Analysis of Motorcycle Sales
- csgreene9
- Apr 13, 2022
- 2 min read
Updated: Apr 20, 2022
Catherine Greene | April 2022

This analysis is a basic exploration of motorcycle sales using Python for a fictional company. The company currently operates three different warehouses within a large metropolitan area.
The goal of this analysis is to answer:
What are the total sales for each payment method?
What is the average unit price for each product line?
Which warehouse had the most profits?
(Investigating further optional)
About the Data
The dataset contains sales information including sale date, warehouse, client type (retail/wholesale), product type, quantity, unit price, total sales amount, and payment type (credit card, cash, transfer). There are 1000 records and 8 fields. It was retrieved from DataCamp.
Sample of the Data

Cleaning the Data
The data column was changed transferred from an object to a date datatype and the day of the week, and month were extracted creating two new columns. There weren't any null values. A snapshot of the final dataframe is below.

Exploration of the Data

Transfers has the greatest total sales with $159,642, followed by credit cards with $110,272, and finally cash with $19,199.10.

The product with the highest average unit price is the engine ($60.09) while the lowest average unit price is held by breaking systems ($17.74).

The greatest total purchase by product, however, is held by suspension and traction with $73,014.2. Engine, having the greatest average unit price, has the second lowest total purchase at $37,945.4.

Retail clients have a greater total purchase value at $23,472.3 while wholesale clients total purchase value is less than a third of the retail clients at $6,849.73.

77.41 % of total purchases are from retail clients whereas 22.59% are from wholesale.

The Central warehouse has the greatest total purchases at $23,663.8, followed by North at $16,700.6, and last West with $7,821.08.

The day of the week with the most sales is Tuesday with $54,313.6 and the lowest is Monday $34,056.3.

August has the greatest average purchases in terms of months with an average of $316.23.
Conclusions
To answer the main questions: Transfers have the greatest total sales overall with a total sale of $159,642. The other payment methods, Credit Cards and Cash, have total sales of $110,272 and $19,199 respectively. The greatest average unit price in regards to product is held by Engines at $60.09 on average and the lowest is Breaking systems with $17.74. The Central warehouse is bringing in the greatest total value.
Comentarios