Styxis
Company
Knowledge

Polars decimal-comma CSV: reconcile each scientific token from the actual file

Reconcile the complete numeric token for every output row so previous-row buffer contents are not approved as valid formatting.

The source table differs from the actual file

Reconcile the complete numeric token for every output row so previous-row buffer contents are not approved as valid formatting. Give Truthound tokens from the actual export rather than the original in-memory table. Correct row counts can still accompany changed numbers. [1, 2, 3]

Two output options used together

Polars #29641 reports a CSV writer accumulating previous-row text when decimal_comma and float_scientific are combined. It supplies string output and file examples. The finding does not establish identical behavior for every locale or compatibility of one notation with all CSV consumers. [1]

Reread the file by row ID

Preserve separator, decimal and scientific settings and original row_id. Read the final CSV and compare tokens by row, withholding accumulated strings from distribution. Fix locale and extract file bytes, retaining row identity so the same numeric set attached to different rows is also detectable. [1, 3]

The second-row token reference

The illustrative input is [1.5,2.5,3.5], using decimal comma, scientific notation and separator ;. Expected second-row token is 2,5e0. That passes; accumulated 1,5e02,5e0 fails. Do not manufacture a normal token by arbitrarily discarding a prefix from the malformed output. [1, 3]

Compare independent format with serialized output

Truthound Core Python SDK 3.3.2 can compare prepared independently_formatted_token and serialized_numeric_token using ColumnPairValidator with relationship="==". The operator formats an independent reference and decodes actual quoting and separators. The SDK does not repair the CSV writer or guarantee every parser’s compatibility. [1, 2, 3]

Agree on a format alternative with the consumer

Verify non-scientific notation or another decimal format agreed with the consumer, then reparse the actual file and reconcile values and row IDs. Decide formatting together with users requiring decimal comma. Reuse valid evidence for the same final-output path. [1, 3]

Application conditions

Fix exact output options and locale and extract tokens from actual file bytes rather than cached tables.

Alternatives

Agree on verified non-scientific or decimal formatting and reparse the actual file to check values and row IDs.

Limitations

  • Core compares extracted token pairs, does not repair the writer and does not guarantee all numeric parsers compatible.

Evidence

Event checked
Subject checked
Modified