Docsity

Data Cleaning for uptrail internship, Exercises of Computer science

Toggle sidebar
bg1
Week 2 - Data Cleaning, Analysis, and
Business Insights
Please write the answers in the 'Project Coversheet' and refer to the
dataset provided for completing the tasks.
Objective:
To clean messy retail sales data, analyse trends, and create visual insights using simple tools
such as Excel/Google Sheets, SQL, and basic visualization tools like Tableau or Power BI.
Tools Needed:
โ— Google Sheets or Excel (for data cleaning)
โ— SQL (MySQL or PostgreSQL) for querying and aggregation
โ— Tableau or Power BI (optional for visualization)
Identified Issues in the data:
โ— Missing values in the "Email" and "Discount (%)" columns.
โ— Duplicate records (John Doe appears twice).
โ— Inconsistent date formats (MM/DD/YYYY, DD-MM-YYYY, YYYY/MM/DD).
โ— Phone numbers missing for some customers.
Example Using Excel:
โ— Use the Remove Duplicates option in the Data tab.
โ— Use the =IF(ISBLANK(A2), "Unknown", A2) formula to fill missing values.
โ— Use the =TEXT(A2, "YYYY-MM-DD") formula to standardize dates.
Example of Using SQL :
UPDATE sales_data SET email = 'not_provided@email.com' WHERE email IS NULL;
pf3
pf4

Partial preview of the text

Download Data Cleaning for uptrail internship and more Exercises Computer science in PDF only on Docsity!

Week 2 - Data Cleaning, Analysis, and

Business Insights

Please write the answers in the 'Project Coversheet' and refer to the

dataset provided for completing the tasks.

Objective:

To clean messy retail sales data, analyse trends, and create visual insights using simple tools such as Excel/Google Sheets, SQL, and basic visualization tools like Tableau or Power BI.

Tools Needed:

โ— Google Sheets or Excel (for data cleaning) โ— SQL (MySQL or PostgreSQL) for querying and aggregation โ— Tableau or Power BI (optional for visualization)

Identified Issues in the data:

โ— Missing values in the "Email" and "Discount (%)" columns. โ— Duplicate records (John Doe appears twice). โ— Inconsistent date formats (MM/DD/YYYY, DD-MM-YYYY, YYYY/MM/DD). โ— Phone numbers missing for some customers.

Example Using Excel:

โ— Use the Remove Duplicates option in the Data tab. โ— Use the =IF(ISBLANK(A2), "Unknown", A2) formula to fill missing values. โ— Use the =TEXT(A2, "YYYY-MM-DD") formula to standardize dates.

Example of Using SQL :

UPDATE sales_data SET email = '[email protected]' WHERE email IS NULL;

DELETE FROM sales_data WHERE Order_ID NOT IN (SELECT MIN(Order_ID) FROM sales_data GROUP BY Customer_Name, Email); UPDATE sales_data SET Order_Date = STR_TO_DATE(Order_Date, '%m/%d/%Y');

2) How can we summarize sales data to identify trends?

Steps to Follow:

  1. Calculate total revenue per product category to determine the most profitable segments.
  2. Find the average discount applied across different customer segments to analyse discount effectiveness.
  3. Analyse monthly sales trends to identify peak sales periods.

Example Using SQL:

  1. SQL queries used for data cleaning and aggregation.
  2. Three visualizations (Heatmap, Scatter Plot, Histogram).
  3. Summary report detailing key findings and business recommendations.