Companies as symbols: company_aliases, merge, duplicates, empty enrichment columns (migration 20)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:45:43 +02:00
1 parent 3adafd8950
commit 9172b2da72
8 files changed
+347 -17

No files matched your search

+7
View File
@@ -67,6 +67,13 @@ def company_key(company: str) -> str:
return _fold(name).replace(" ", "-")
def company_fold(company: str) -> str:
"""What `company_aliases` keys on: `company_key`'s cut of the legal form,
then the place fold, so "Orsted A/S" and "Ørsted" are both `orsted`. The
key itself keeps `ø`, since it is a primary key."""
return _place_fold(_LEGAL.sub("", (company or "").strip()))
# ---------------------------------------------------------------- geography
#: Letters NFKD leaves whole because they are letters of their own rather