Is your feature request related to a problem? Please describe.
Accept pythonic class with @pa.check_io, without the invocation of .to_schema()
import pandas as pd
import pandera as pa
from pandera.typing import Index, DataFrame, Series
class Link1_schema(pa.SchemaModel):
id: Index[int]
data: Series[int]
class Config:
strict = True
ordered = True
#@pa.check_io(data=Link1_schema.to_schema(), out=Link1_schema.to_schema()) # ACCEPTED
@pa.check_io(data=Link1_schema, out=Link1_schema) # ERROR
def f(data:pd.DataFrame[Link1_schema.to_schema()]) -> pd.DataFrame[Link1_schema.to_schema()]:
#Link1_schema.validate(data)
data['data']=2
return data
d=DataFrame[Link1_schema]({"data":[1,2]}) # Validation lors de la création
f(d)
Describe the solution you'd like
I would like to accept
Is your feature request related to a problem? Please describe. Accept pythonic class with @pa.check_io, without the invocation of
.to_schema()
Describe the solution you'd like I would like to accept
Additional context The Schema Models must be equivalent of the Dataframe schema