aNet.ai
Data Science/Learning path
0day streak0XP · Lv 1
← 3. Data Cleaning and Quality
Lesson 4.3 7 min · 171 words

Meaning comes before conversion

Changing text to a number is not enough. You must know the unit, date convention and approved category meanings.

Trim outside spaces and map approved aliases: ' biology ', 'Biology' and 'BIO' may become Biology when the dictionary confirms the equivalence. Bioengineering stays separate. Similar spelling alone does not authorise merging concepts.

Percentages require a declared target representation. If a proportion column uses 0-1, '67%' becomes 0.67. If the entry-score dictionary uses 0-100 points, a verified '67%' representation becomes 67 points. W3's general conversion slide and its score exercise use different target units; neither rule should be applied blindly to every column.

'00124' is an ID and should keep its leading zeros. '1,200' needs a locale/separator convention. '03/04/2026' is 3 April under day/month/year and 4 March under month/day/year. Both parse successfully; source evidence chooses the meaning. In your earlier registry lab, the explicit format is %d/%m/%Y.

pd.to_numeric(..., errors='coerce') makes failed conversions missing. It does not infer zero or recover a true exam mark. Keep the raw text and distinguish originally blank from unparsed. 'seventy' contains information but remains unresolved in this lab until source verification supplies an approved numeric value.

Source: W3 PDF pp. 4-55. The 14-row registry example below comes from the Week 3 lab code you previously pasted in this conversation; it is separate from the lecture's smaller examples.

Practice problems

Supplementary study questions on the lecture concepts — not verbatim exam questions. Each answer counts toward spaced review.

1. Conceptual understanding

Definitions and distinctions.

Question 1 of 6 · +5 XP

The score dictionary uses 0–100 points. What should verified text '67%' become?

Question 2 of 6 · +5 XP

What does errors='coerce' establish about the text 'seventy'?

2. Application

Apply the concept to a case or calculation.

Question 3 of 6 · Score units · +5 XP

A verified '80%' belongs in a 0–1 proportion field. What is the numeric value?

Question 4 of 6 · Dates · +5 XP

Under day/month/year, what does 05/04/2026 mean?

3. Interpretation and limitations

Evaluate assumptions and justify conclusions.

Question 5 of 6 · Programme meaning · +5 XP

Why should Bioengineering remain separate from Biology?

Question 6 of 6 · Parsing · +5 XP

A numeric parser turns 'seventy' into missing. What should the record retain?

Explain it in writing

Self-checked, not marked. Write a few sentences, then compare with the example answer. Your writing is saved as you type.

Show an example answer

The word contains a possible intended value, but the parser did not confirm it. A blank has no recorded measurement. Keeping their origins separate helps source follow-up.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Show an example answer

Both 3 April and 4 March are valid dates for 03/04 under different conventions. Successful parsing does not establish which date the source intended.

Check: did you answer the question, use evidence or working, and avoid claiming more than the evidence supports?

Practice this topic
Saved in this browser as you type.
aNet.ai · Data Science Fundamentals · Weeks 1–5 · practice material, not an official examProgress saved in this browser