Skip to main content

incorrect_field_count

No overview available.

def incorrect_field_count(
row: list,
expected_count: int
) - > bool

Validates whether a given row of data contains the expected number of fields based on a predefined schema. Use this to identify malformed or corrupted records during data ingestion or CSV parsing.

Parameters

NameTypeDescription
rowlistA list of field values representing a single record from a dataset.
expected_countintThe required number of columns defined by the data schema or header.

Returns

TypeDescription
boolTrue if the number of fields in the row does not match the expected count, False otherwise.