HistoryView
#
Bases: object
A lazy view over History objects for each node.
dt
property
#
Access history events as UTC datetimes.
Returns:
| Type | Description |
|---|---|
HistoryDateTimeView
|
A lazy view over HistoryDateTime objects for each node. |
event_id
property
#
Access the unique event id of each time entry.
Returns:
| Type | Description |
|---|---|
HistoryEventIdView
|
A lazy view over HistoryEventId objects for each node. |
intervals
property
#
Access the intervals between consecutive timestamps in milliseconds.
Returns:
| Type | Description |
|---|---|
IntervalsView
|
A lazy view over Intervals objects for each node. |
t
property
#
Access history events as timestamps (milliseconds since the Unix epoch).
Returns:
| Type | Description |
|---|---|
HistoryTimestampView
|
A lazy view over HistoryTimestamp objects for each node. |
__eq__(value)
#
Return self==value.
__ge__(value)
#
Return self>=value.
__getitem__(key)
#
Return self[key].
__gt__(value)
#
Return self>value.
__iter__()
#
Implement iter(self).
__le__(value)
#
Return self<=value.
__len__()
#
Return len(self).
__lt__(value)
#
Return self<value.
__ne__(value)
#
Return self!=value.
__repr__()
#
Return repr(self).
collect()
#
collect_time_entries()
#
compute()
#
Compute all values and return the result as a node view
Returns:
| Type | Description |
|---|---|
NodeStateHistory
|
the computed |
earliest_time()
#
Get the earliest time entry.
Returns:
| Type | Description |
|---|---|
EarliestTimeView
|
A lazy view over the earliest time of each node as an EventTime. |
flatten()
#
Flattens all history objects into a single history with all time entries ordered.
Returns:
| Type | Description |
|---|---|
History
|
a history object containing all time entries |
get(node, default=None)
#
items()
#
latest_time()
#
Get the latest time entry. Returns: LatestTimeView: A lazy view over the latest time of each node as an EventTime.
sorted_by_id()
#
to_df()
#
Convert results to pandas DataFrame
The DataFrame has two columns, "node" with the node ids and "value" with the corresponding values.
Returns:
| Type | Description |
|---|---|
DataFrame
|
A Pandas DataFrame. |