pandera.io.pandas_io.to_script

pandera.io.pandas_io.to_script(dataframe_schema, path_or_buf=None, *, minimal=True)[source]

Write DataFrameSchema to a python script.

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

  • path_or_buf – filepath or buf stream to write to. If None, outputs string representation of the script.

  • minimal (bool) – If True (default), omit constructor-default kwargs in the generated Column and DataFrameSchema calls.

Returns:

yaml string if stream is None, otherwise returns None.