From Dev.to
Find whitespace and case-variant duplicates in a CSV column with Python (stdlib only)
Messy whitespace and inconsistent capitalisation are two of the most common reasons a CSV import produces duplicates or silently fails to match. blue-shirt and blue-shirt (trailing space) look identic...
