Data Cleaning Reps

← All exercises

California, spelled two ways

IntermediateLIKE, inconsistent labelsEarthquakes (USGS, Oct 2026)

Some places end in , CA and some in , California. Count all events in California, catching both spellings.

Hint

Use two LIKE patterns joined with OR. The % wildcard matches anything before the comma.

Same question in Excel / Google Sheets

=COUNTIF(J:J,"*, CA")+COUNTIF(J:J,"*, California")

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.

← Find the rows with a missing placeEvents per day →