A product code is not a quantity
The invented codes 00123 and 123 identify different products in this example. A supplier might instead declare them equivalent; get that rule in writing rather than assuming it. Inspect the original permitted file, parsed field and lookup key separately. Once an upstream spreadsheet has removed the zero, converting the damaged value back to text cannot recover the original code.
- Keep leading zeros, letter case and surrounding-space policy explicit.
- Include a long all-digit code and an alphanumeric code in the synthetic fixture.
- Do not open and resave the only copy merely to inspect it.
Check conversions at the import boundary
Python's CSV reader defaults to strings, but QUOTE_NONNUMERIC converts unquoted fields to floats. A different parser or spreadsheet can follow different rules. Inspect the installed importer rather than assuming every CSV reader is safe. Numeric conversion, trimming and case folding are separate decisions; a string field can still be altered by later normalization.
- Compare exact synthetic strings after parsing, mapping and lookup.
- Do not infer identity from how a spreadsheet displays a cell.
- Unknown or already damaged identifiers need an exception, not a guessed zero-padding rule.
What a repair must demonstrate
Use 00123, 123 and an invented long identifier. The same fixture must reach three distinct intended keys without numeric coercion. Capture the failure on the old code and the pass after repair. Check a known ordinary code as well. This batch supplies an authored collision matrix, not a production import or customer correction.
- Historical duplicates or wrong-product updates require separately authorised reconciliation.
- A safe local parser test does not prove supplier downloads or live database writes work.
Priced enquiry and non-fit
One reproducible local identifier-conversion bug may fit fix-one-bug-with-regression-test, from £295 after bounded reproduction and a fixed repair quote. The code must run in isolation with synthetic inputs and no production credentials. Existing-record repair, supplier onboarding, a schema migration or a live feed connection is outside that offer. Send invented input strings and expected keys, not source code, customer records or access invitations. The price is an untested proposal; payment follows agreed passing checks and sign-off.
- If the original identifier has already been lost, ask the supplier or authorised operator for the authoritative source before requesting a code repair.
Sources and limits
- Python csv documentation: reader type conversion Checked 2026-10-11.
- csv.reader returns strings by default; QUOTE_NONNUMERIC converts unquoted fields to floats.
- Current regression-test repair scope and proposed price Checked 2026-10-11.