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
| Name | Type | Description |
|---|---|---|
| row | list | A list of field values representing a single record from a dataset. |
| expected_count | int | The required number of columns defined by the data schema or header. |
Returns
| Type | Description |
|---|---|
bool | True if the number of fields in the row does not match the expected count, False otherwise. |