Data Cleaning Reps

← All exercises

Automatic or manual?

Intermediatetext parsingVehicle fuel economy (FuelEconomy.gov, model years 2010–2027)

The trany column mixes formats like Automatic (S8) and Manual 6-spd. Return each of Automatic / Manual / Other with its count, for model year 2024 only.

Hint

LIKE 'Auto%' and LIKE 'Manual%' are enough here.

Same question in Excel / Google Sheets

=IF(LEFT(G2,4)="Auto","Automatic",IF(LEFT(G2,6)="Manual","Manual","Other")) + pivot filtered to 2024.

Download the CSV from the datasets page. Column letters assume the CSV opens with its header in row 1.

Tip: Ctrl+Enter (⌘+Enter on Mac) checks your answer. Everything runs in your browser; nothing you type is sent anywhere.

← Collapse drive labels into groupsMost efficient non-plug-in cars of 2024 →