Attribute Parameters

Attribute Parameters

Parameter reference manual for Attribute (field properties).

Parameter List

Required Parameters

ParameterTypeDescription
namestringField name (automatically set when used as key)

Basic Attributes

ParameterTypeDefaultDescription
typestringnullData type: int, float, str, date, datetime
descriptionstringnullField description text
logical_typestringnullLogical type annotation (e.g., email, phone)

Type Attributes (type_attr)

type_attr is a dictionary containing type-related settings:

ParameterTypeDefaultDescription
type_attr.nullablebooleantrueAllow null values
type_attr.categorybooleanfalseWhether categorical data
type_attr.precisionintegernullNumeric precision (decimal places)
type_attr.formatstringnullDatetime format string (e.g., "%Y-%m-%d")
type_attr.widthintegernullString width (for leading zeros)
ℹ️
Simplified Syntax: Parameters in type_attr can be written directly at attribute level. For example, nullable: false is equivalent to type_attr.nullable: false.

Data Processing

ParameterTypeDefaultDescription
na_valueslist/stringnullCustom missing value markers (e.g., "?", ["?", "N/A"])
default_valueanynullDefault fill value
cast_errorsstring"coerce"Type conversion error handling: "raise", "coerce", "ignore"
null_strategystring"keep"Null value handling strategy: "keep", "drop", "fill"

Data Validation

ParameterTypeDefaultDescription
constraintsdictnullField constraint conditions (min, max, pattern)

Performance & Statistics

ParameterTypeDefaultDescription
enable_optimize_typebooleantrueEnable type optimization (select smallest data type)
enable_statsbooleantrueCalculate field statistics

System Auto-Generated

These parameters are automatically set by the system, do not set manually:

ParameterTypeDescription
statsFieldStatsField statistics (when enable_stats=True)
is_constantbooleanMark fields with all identical values
created_atdatetimeCreation timestamp
updated_atdatetimeUpdate timestamp

Common Examples

Integer Field

age:
  type: int
  nullable: false
  description: "Age"

Categorical Field

gender:
  type: str
  category: true
  description: "Gender"

Float (Specify Precision)

price:
  type: float
  precision: 2
  description: "Price (two decimal places)"

Date Field

birth_date:
  type: date
  format: "%Y-%m-%d"
  description: "Birth date"

Custom Missing Values

workclass:
  type: str
  category: true
  na_values: "?"
  description: "Employment type"

Important Notes

  • Type Simplification: Use int, float, str, date, datetime (legacy type names auto-converted)
  • Category Marking: Correctly setting category: true affects data processing and synthesis strategies
  • Auto-Inference: Unspecified parameters are automatically inferred from data
  • Performance: For large datasets, disable enable_stats to improve speed