Skip to content

YAGIRO practice

Compare two tag columns in an inspection log

The inspection log has two columns named tag and a fourth column with no heading. Use six fictional records to explain why two blank-looking cells can count differently.

1. Count by position

Open inspection.csv in the column profile tool with comma-separated input and headings enabled. Award one point if there are 6 data records and the two tag columns appear separately at positions 2 and 3.

2. Check the second column

In column 2, count empty strings, whitespace-only cells and cells containing other text, in that order. Award one point for 1, 1 and 4, with 5 distinct original strings. OK, ok and a space followed by OK are three different strings.

3. Check what looks blank

Award one point if column 3 has 1 empty string, 3 whitespace-only cells, 2 other cells and 4 distinct strings. The whitespace-only cells contain either one space or two. In inspection-answer.json, check all four columns and verify that each column’s three cell counts add up to 6.

4. Make one deliberate correction

In a copy of the table, find the second data record (bin 002). Remove the single space before OK in column 2. Keep all other text as supplied and check the table again. Award one point if the distinct count for column 2 drops from 5 to 4 while its three cell counts stay at 1, 1 and 4.

Files for this exercise

Use the fictional input files, then check your result against the answer key.

Continue with a check