Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit df87f7f

Browse files
committed
Updated aggregateList example in readme and quickstart. Also changed indexation in query_api.py to avoid an index error occuring when using the client as suggested in documentation.
1 parent 22ab361 commit df87f7f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ data = client.query.getDataById(
5555
timeseries=["timeseries_id1", "timeseries_id2"],
5656
timespan=["2019-12-12T15:35:11.68Z", "2019-12-12T17:02:05.958Z"],
5757
interval="PT5M",
58-
aggregateList=["avg"],
58+
aggregateList=["avg", "avg"],
5959
useWarmStore=False
6060
)
6161
````

TSIClient/query/query_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,12 @@ def _getData(
669669
if isinstance(aggregateList, list):
670670
for idx, agg in enumerate(aggregateList):
671671
currColName = colNames[i] + "/" + agg
672-
df[currColName] = response["properties"][idx]["values"]
672+
# print(len(response['properties']))
673+
# print(type(response['properties']))
674+
675+
# print(type(response['properties'][0]))
676+
677+
df[currColName] = response["properties"][0]["values"]
673678
else:
674679
df[colNames[i]] = response["properties"][0]["values"]
675680

0 commit comments

Comments
 (0)