pandera.schemas.DataFrameSchema.to_yaml

DataFrameSchema.to_yaml(stream: None = None) str[source]
DataFrameSchema.to_yaml(stream: os.PathLike) None

Write DataFrameSchema to yaml file.

Parameters

stream (Optional[PathLike]) – file stream to write to. If None, dumps to string.

Return type

Optional[str]

Returns

yaml string if stream is None, otherwise returns None.