polars.Config.save_to_file#

classmethod Config.save_to_file(file: Path | str) None[source]#

Save the current set of Config options as a JSON file.

Parameters:
file

Optional path to a file into which the JSON string will be written. Leave as None to return the JSON string directly.

See also

load

Load (and set) Config options from a JSON string.

load_from_file

Load (and set) Config options from a JSON file.

save

Save the current set of Config options as a JSON string.

Examples

>>> json_file = pl.Config().save("~/polars/config.json")