Cheat Sheet BUY NOW Intermediate Preview available

Text and Regular Expressions for Cleaning

by LucidPlexus
0.00 · 0 reviews
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…
2 Pages
0 Views
0 Downloads

Overview

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.

Type Cheat Sheet
Pages 2
Access Buy Now

Preview

Check the resource before buying — a limited-page preview.

Open PDF
Loading preview…

This is a limited-page preview. If it does not load, open the PDF directly.

Ratings & Reviews

One review per person. Submitting again updates your existing review.

0 total

Write a review

Share what helped, what stood out, or who this resource is best for.

No reviews yet

Be the first to review this resource.

Login to Buy Preview