Edit page in Livemark
(2023-06-06 13:09)

Yearmonth Field

Overview

A specific month in a specific year as per XMLSchema gYearMonth. Usual lexical representation is: YYYY-MM. Read more in Table Schema Standard.

Example

from frictionless import Schema, extract, fields

data = [['name'], ['2022-08']]
rows = extract(data, schema=Schema(fields=[fields.YearmonthField(name='name')]))
print(rows)
{'memory': [{'name': yearmonth(year=2022, month=8)}]}

Reference

fields.YearmonthField (class)

fields.YearmonthField (class)

Field representation

Signature

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

Parameters

  • name (str)
  • title (Optional[str])
  • description (Optional[str])
  • format (str)
  • missing_values (List[str])
  • constraints (dict)
  • rdf_type (Optional[str])
  • example (Optional[str])
  • schema (Optional[Schema])

fields.yearmonthField.name (property)

Signature

str

fields.yearmonthField.type (property)

Signature

ClassVar[str]

fields.yearmonthField.title (property)

Signature

Optional[str]

fields.yearmonthField.description (property)

Signature

Optional[str]

fields.yearmonthField.format (property)

Signature

str

fields.yearmonthField.missing_values (property)

Signature

List[str]

fields.yearmonthField.constraints (property)

Signature

dict

fields.yearmonthField.rdf_type (property)

Signature

Optional[str]

fields.yearmonthField.example (property)

Signature

Optional[str]

fields.yearmonthField.schema (property)

Signature

Optional[Schema]

fields.yearmonthField.builtin (property)

Signature

ClassVar[bool]

fields.yearmonthField.supported_constraints (property)

Signature

ClassVar[List[str]]