0% found this document useful (0 votes)
4 views1 page

Data Cleansing and Querying Prompts

The document provides a series of prompts for practicing data querying and cleansing tasks, including identifying outliers, normalizing attributes, correcting categorical values, converting date formats, segmenting customers by spending, analyzing age distribution, and performing gender analysis. Each prompt includes specific instructions and expected outcomes. It concludes with a congratulatory note for completing the lab on data generation and cleansing.

Uploaded by

iola
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Data Cleansing and Querying Prompts

The document provides a series of prompts for practicing data querying and cleansing tasks, including identifying outliers, normalizing attributes, correcting categorical values, converting date formats, segmenting customers by spending, analyzing age distribution, and performing gender analysis. Each prompt includes specific instructions and expected outcomes. It concludes with a congratulatory note for completing the lab on data generation and cleansing.

Uploaded by

iola
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Firefox [Link]

The AI generates an output, as shown below. Here are the screenshots showing the beginning of the output and
the last few lines.

Now that you have performed three basic data cleansing tasks, you can practice data querying and cleansing
using the following prompts.

Try it yourself
Try the following prompts yourself.

Prompt 1: Identify outliers


Identify any outliers in the 'transaction_amount' attribute using statistical methods such as the IQR (Interquartile
Range). Provide suggestions on how to handle these outliers.

Prompt 2: Normalize numeric attributes


Normalize the 'transaction_amount' attribute to have a mean of 0 and a standard deviation of 1. Provide the
updated data set.

Prompt 3: Correct invalid categorical values


Validate the 'product_category' values against the predefined list ["Electronics", "Clothing", "Grocery", "Home &
Kitchen", "Books"]. Correct any invalid entries and provide the updated data set.

Prompt 4: Convert date formats


Ensure that all 'transaction_date' values are in the standard format YYYY-MM-DD. Convert any dates that are
not in this format and provide the updated data set.

Prompt 5: Segment customers by spending


Create a new attribute 'spending segment' that segments customers into "Low", "Medium", and "High" based on
their total spending. Define the thresholds for each segment and provide the updated data set.

Prompt 6: Analyze age distribution


Generate a summary of the age distribution of customers, including minimum, maximum, and average age.

Prompt 7: Gender analysis


Count the number of male and female customers in the data set and provide the result.

Summary
Congratulations on completing the hands-on lab on data generation and cleansing.

10 of 11 1/1/2025, 4:31 PM

You might also like