資料型別

Schema 支援的基本資料型別。

基本型別

型別名稱YAML 語法說明範例值
整數type: int6464 位元整數123, -456
浮點數type: float6464 位元浮點數3.14, -0.5
字串type: string文字資料"Hello", "123"
布林type: boolean真假值true, false
日期時間type: datetime64日期與時間"2024-01-15", "2024-01-15 14:30:00"
ℹ️
分類資料:使用 category: true 參數來標記分類資料,而不是 type: category

型別對應

Pandas dtypeSchema type
int8, int16, int32, int64int64
uint8, uint16, uint32, uint64int64
float16, float32, float64float64
object, stringstring
boolboolean
datetime64datetime64