Slide 57
Slide 57 text
panderaの利用例〜スキーマの定義〜
57
import pandera as pa
from pandera.typing import Series
class IrisSchema(pa.SchemaModel):
sepal_length: Series[float] = pa.Field(gt=0, le=8)
sepal_width: Series[float] = pa.Field(gt=0, le=5)
petal_length: Series[float] = pa.Field(gt=0, le=7)
petal_width: Series[float] = pa.Field(gt=0, le=3)
target: Series[int] = pa.Field(isin=[0, 1, 2])
0/1/2(カテゴリ)
現実的な数値