getLabels
List labels used in the asset model, or labels for specific nodes.
Signature
Section titled “Signature”getLabels(codes=None, output="json")
codes(str | list[str] | None)output(str):json(default),df,raw
Inputs
Section titled “Inputs”codes: Node code(s) to return labels for. Omit to list all labels.output: Output format selector.
Examples
Section titled “Examples”All labels
Section titled “All labels”labels = model.getLabels()Response (json):
["AssetObject", "Equipment", "Location"]Labels for a single asset
Section titled “Labels for a single asset”labels = model.getLabels("Pump_01")Response (json):
["AssetObject", "Equipment"]Multiple assets with DataFrame output
Section titled “Multiple assets with DataFrame output”labels_df = model.getLabels(["System_01", "Pump_01"], output="df")| code | labels |
|---|---|
| System_01 | [“AssetObject”,“Location”] |
| Pump_01 | [“AssetObject”,“Equipment”] |