opendssdirect.utils
#
Module Contents#
Classes#
Functions#
Export all DSS properties for a selected DSS object class. |
|
Return the data from current active monitor as a Pandas DataFrame |
|
Use the Text interface of OpenDSS, grabbing all output text in a string. |
|
Iterate and export all data from the classic API class/module to a dataframe. |
|
Data#
API#
- opendssdirect.utils.capacitors_to_dataframe(dss=None)#
- opendssdirect.utils.class_to_dataframe(class_name, dss=None, transform_string=None, clean_data=None)#
Export all DSS properties for a selected DSS object class.
This function uses the
ActiveClass
,Element
andProperties
interfaces to iterate through the elements, extracting the value of each DSS property.Caveats are:
All properties are exported; this can be misleading since the order of definition and which properties are used can change how the DSS models behave.
All data is exported as text and must be reinterpreted in Python.
It can be slow for large circuits.
Due to these caveats, the function has been marked deprecated. Still, it has been used by many third-party software as a way to extract important data, so it will be kept for backwards compatibility.
For alternatives:
Check the functions for JSON output, such as
Circuit.ToJSON()
(whole circuit),ActiveClass.ToJSON()
(a whole class), andElement.ToJSON()
. The DSS-Python examples are a good starting point (all related functions are also available in OpenDSSDirect.py): https://dss-extensions.org/DSS-Python/examples/JSONThe JSON output/input, and other future alternatives are based on the work-in-progress AltDSS Schema project. Check dss-extensions/AltDSS-Schema
- opendssdirect.utils.fuses_to_dataframe(dss=None)#
- opendssdirect.utils.generators_to_dataframe(dss=None)#
- opendssdirect.utils.getmembers(module)#
- opendssdirect.utils.is_pandas_installed#
True
- opendssdirect.utils.isource_to_dataframe(dss=None)#
- opendssdirect.utils.lines_to_dataframe(dss=None)#
- opendssdirect.utils.loads_to_dataframe(dss=None)#
- opendssdirect.utils.loadshape_to_dataframe(dss=None)#
- opendssdirect.utils.meters_to_dataframe(dss=None)#
- opendssdirect.utils.monitor_to_dataframe(dss=None)#
Return the data from current active monitor as a Pandas DataFrame
- opendssdirect.utils.monitors_to_dataframe(dss=None)#
- opendssdirect.utils.pvsystems_to_dataframe(dss=None)#
- opendssdirect.utils.reclosers_to_dataframe(dss=None)#
- opendssdirect.utils.regcontrols_to_dataframe(dss=None)#
- opendssdirect.utils.relays_to_dataframe(dss=None)#
- opendssdirect.utils.run_command(text, dss=None)#
Use the Text interface of OpenDSS, grabbing all output text in a string.
This is deprecated since it doesn’t handle errors as exceptions and can confuse users.
Prefer using
dss("commands")
,dss.Text.Command("command")
, ordss.Text.Commands("commands")
,.
- opendssdirect.utils.sensors_to_dataframe(dss=None)#
- opendssdirect.utils.to_dataframe(module)#
Iterate and export all data from the classic API class/module to a dataframe.
If Pandas is not available, a dict of dicts is returned.
- opendssdirect.utils.transformers_to_dataframe(dss=None)#
- opendssdirect.utils.vsources_to_dataframe(dss=None)#
- opendssdirect.utils.xycurves_to_dataframe(dss=None)#