This message was deleted.
# hamilton-help
s
This message was deleted.
e
Hey! Hamilton and pydantic are quite compatible. Pydantic is a way of handling types. You can use it to specify types, validate, serialize, etc… hamilton is a way of handling transforms! So have Hamilton functions take in dataframes, transform them, then output pydantic models.
👍 1
t
As far as I know, Pydantic doesn't have features to check dataframe schemas. Unless you are using / need to use Pydantic, I suggest looking at the data validation library pandera which Hamilton has an integration with pandera: https://pandera.readthedocs.io/en/stable/ integration: https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/data_quality/pandera Essentially, you would be adding
@check_output(schema=PANDERA_SCHEMA)
on your Python functions that return
pd.DataFrame
or
pd.Series
and it would ensure your dataframe has a valid schema!