pandera.io.pandas_io.to_json

pandera.io.pandas_io.to_json(dataframe_schema, target=None, dataframe_library=None, *, minimal=True, **kwargs)[source]

Write DataFrameSchema to json file.

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

  • target – file path or stream to write to. If None, returns a dump to string.

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

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

  • kwargs – keyword arguments to pass into json.dump()

Returns:

json string if stream is None, otherwise returns None.