bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/Data Science/Dataset Practice
Data Science•Dataset Practice

Data Science Practice: Clean and Mutate Columns

Mutate lab

Create the column the analysis actually needs

Revenue alone hides acquisition spend. Add net revenue before judging the campaign.

1/3 checks
Filter rows

Region

Shape data

Metric

Model

Feature

Train split

Puzzle target

Turn on Net revenue and chart that derived metric.

○Net revenue column is visible
○Chart metric uses net revenue
✓Rows are still available for comparison

Working dataset

CityRegionVisitsSignupsRevenueSatisfaction
VancouverWest1,200156$18,40086
CalgaryWest86095$9,90074
TorontoCentral2,100252$32,60082
MontrealEast1,580181$21,20079
HalifaxEast64083$8,70088

Revenue visual

Vancouver
$18,400
Calgary
$9,900
Toronto
$32,600
Montreal
$21,200
Halifax
$8,700

Tiny model

Feature

Visits

Train

60%

Predicted revenue

$21,793

This is intentionally small: change one feature, keep a holdout split, and explain what changed before trusting the model.

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind Data Science Practice: Clean and Mutate Columns?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Order

Put the learning moves in the order that makes the concept easiest to apply.

- Add the net revenue column, chart it, and compare it against raw revenue.
Work directly with the dataset lab below.
Data Science Practice: Clean and Mutate Columns
3Data move

Before charting or modeling a dataset, which move should come first?

Work directly with the dataset lab below. The controls change the rows, derived columns, visual, and tiny model summary in place.

Practice surfaceWhat you manipulate
DatasetCampaign rows with visits, signups, revenue, satisfaction, and promo cost
TransformFilters, derived net revenue, metric choice, and sorting
ModelOne-feature prediction with a train and holdout split
GoalCreate a derived net-revenue column before comparing performance.

Practice Task

  • Add the net revenue column, chart it, and compare it against raw revenue.
  • Watch the checklist in the lab update as the dataset state changes.
  • Use the table, visual, and model card together before deciding what the data says.

Previous

Data Science Practice: Filter a Dataset

Next

Data Science Practice: Build a Visual