Real records arrive as files written by other people: names with stray spaces, a word where a number should be, a line that does not fit. This module reads the barangay’s records from files, cleans the text, checks its shape with regular expressions, and handles what does not fit without the notebook falling over.
What you do
Section titled “What you do”- Working with text: its methods
- Patterns with regular expressions
- Reading and writing files: text and CSV
- Errors and exceptions: handling them, and failing with a clear message
The module’s notebooks
Section titled “The module’s notebooks”- 50_text_and_files.ipynbText, files and errorsRead itCompanion · 6 exercises
The notebooks are in your course folder; here you can read them without running anything.
Quizzes
- Check-inAt the end of the module. A short check on “Text, files and errors”, and how ready you feel; its answers show as soon as you submit.Check-in: Text, files and errors ↗
The quizzes are on BNHR Quizzes and count toward nothing. Learning on your own, a quiz opens as the self-paced one; while a training runs, it asks which training you are in.