Everything useful before you download or buy.
Find, fix and pull numbers out of messy text columns, in DuckDB and pandas.
Two A4 pages on regular expressions for data cleaning: anchors, character classes, quantifiers, groups and alternation; DuckDB's regexp_matches, regexp_full_match, regexp_replace and regexp_extract; and their pandas .str equivalents.
Every query runs on the LucidPlexus book datasets, faults included, and its real result is printed under it: thousands separators that make 337.5 million tonnes of CO2 drop out of a total, spellings that split one category in two, market sizes written as "$661.0M" or "0.2 billion", growth rates written as "17 percent", dates in three formats, and words in number columns.
It shows the pitfalls that give wrong answers quietly (replacing only the first match, an unescaped dot, a search used as a validation, greedy matching, case and NULLs) and ends with a checklist.
PDF to print, and an HTML version to read on screen.
Check the resource before buying — a limited-page preview.
This is a limited-page preview. If it does not load, open the PDF directly.
One review per person. Submitting again updates your existing review.
Be the first to review this resource.