Ysabel Caballes
07/30/2023, 12:47 PM@flow
def clean_data_flow(df: pd.DataFrame) -> pd.DataFrame:
df = remove_nulls(df)
return df
When I try to run it, I get this error:
File "pydantic/validators.py", line 765, in find_validators
`RuntimeError: no validator found for <class 'pandas.core.frame.DataFrame'>, see arbitrary_types_allowed
in Config`
If I remove the data validators, so my flow looks like this:
@flow
def clean_data_flow(df):
df = remove_nulls(df)
return df
My code works fine. Not sure why this is happening.Daniel
07/31/2023, 10:46 PMarbitrary_types_allowed
but since you're using @flow
I don't think you can do that. You can either skip validation as you have done, or pass a more standard type. If you're going to deploy the flow then the parameters also need to be json-serialisable.Ysabel Caballes
08/02/2023, 1:04 PM