Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1df['suburb'].str.title() | AConverts mixed date entries into one date format, using day-month-year order when reading them | |
| 2pd.to_datetime(df['date'], dayfirst=True) | BThe same date is recorded in three formats. Pick one format, such as YYYY-MM-DD, and use it for every entry. | |
| 3Two sources must agree: a student's year level in the enrolment file should match the year level in the results file | Cheight_cm = height_m * 100 | |
| 4Units must be consistent: a height column mixes metres and centimetres, so every value is converted to centimetres | Denrol['year'] == results['year'] | |
| 5State column holds: QLD, Qld, Queensland, qld | EMakes every suburb name use the same capitalisation, so 'brisbane' and 'BRISBANE' both become 'Brisbane' | |
| 6Dates in one column: 03/04/2025, 2025-04-03, 3 Apr 25 | FThe same state is spelled four different ways. Choose one form, such as QLD, and use it for every record. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Data consistency — Data is consistent when the same thing is recorded in the same form (one spelling, date format and unit) and agrees everywhere it appears, including across different sources.city = city.lower().strip()fixes = {"bne": "brisbane"}
if city in fixes:
city = fixes[city]from datetime import datetime
d = datetime.strptime(text, "%d/%m/%Y")
print(d.strftime("%Y-%m-%d"))metres = round(cm / 100, 2)if sales != ledger:
print("Sources disagree")