pypsa.Network.export_to_csv_folder#
- Network.export_to_csv_folder(csv_folder_name: str, encoding: str | None = None, export_standard_types: bool = False) None #
Export network and components to a folder of CSVs.
Both static and series attributes of all components are exported, but only if they have non-default values.
If
csv_folder_name
does not already exist, it is created.csv_folder_name
may also be a cloud object storage URI if cloudpathlib is installed.Static attributes are exported in one CSV file per component, e.g.
generators.csv
.Series attributes are exported in one CSV file per component per attribute, e.g.
generators-p_set.csv
.- Parameters:
csv_folder_name (string) – Name of folder to which to export.
encoding (str, default None) – Encoding to use for UTF when reading (ex. ‘utf-8’). List of Python standard encodings
export_standard_types (boolean, default False) – If True, then standard types are exported too (upon reimporting you should then set “ignore_standard_types” when initialising the network).
Examples
>>> n.export_to_csv_folder(csv_folder_name)