pandera.io.pandas_io.to_yaml

pandera.io.pandas_io.to_yaml(dataframe_schema, stream=None, dataframe_library=None, *, minimal=True)[source]

Write DataFrameSchema to yaml file.

Parameters:
  • dataframe_schema – schema to write to file or dump to string.

  • stream – file stream to write to. If None, dumps to string.

  • dataframe_library – optional dataframe_library tag; see serialize_schema().

  • minimal (bool) – passed to serialize_schema().

Returns:

yaml string if stream is None, otherwise returns None.