Edit page in Livemark
(2024-12-13 12:49)

Array Field

Overview

The field contains data that is a valid JSON format arrays. Read more in Table Schema Standard.

Example

from frictionless import Schema, extract, fields

data = [['name'], ['["value1", "value2"]']]
rows = extract(data, schema=Schema(fields=[fields.ArrayField(name='name')]))
print(rows)
{'memory': [{'name': ['value1', 'value2']}]}

Reference

fields.ArrayField (class)

fields.ArrayField (class)

Field representation

Signature

(*, name: str, title: Optional[str] = None, description: Optional[str] = None, format: str = default, missing_values: List[str] = NOTHING, constraints: Dict[str, Any] = NOTHING, rdf_type: Optional[str] = None, example: Optional[str] = None, schema: Optional[Schema] = None, array_item: Optional[Dict[str, Any]] = NOTHING) -> None

Parameters

  • name (str)
  • title (Optional[str])
  • description (Optional[str])
  • format (str)
  • missing_values (List[str])
  • constraints (Dict[str, Any])
  • rdf_type (Optional[str])
  • example (Optional[str])
  • schema (Optional[Schema])
  • array_item (Optional[Dict[str, Any]])

fields.arrayField.array_item (property)

A dictionary that specifies the type and other constraints for the data that will be read in this data type field.

Signature

Optional[Dict[str, Any]]