Skip to content

Commit ccf8f91

Browse files
author
Enric Sala
committed
Update the group by tags example in the README
1 parent 2de8ed9 commit ccf8f91

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ result = influxdb.query('weather') ...
130130
% Another example with more options
131131
result = influxdb.query(TEST_TAGS) ...
132132
.fields('mean(temperature)', 'sum(rain)') ...
133-
.groupByTags('city', 'station') ...
133+
.groupByTags('country', 'city') ...
134134
.groupByTime('3h', 'linear') ...
135135
.limit(100) ...
136136
.execute();
@@ -142,9 +142,12 @@ The result of a query is an object that provides additional functionalities:
142142
% Check which series are present in a result
143143
series_names = result.names()
144144
145-
% Extract a specific series
145+
% Get series with matching name
146146
weather = result.series('weather')
147147
148+
% When grouping by tags, get series with matching tags
149+
weather_bcn = result.series('weather', 'city', 'barcelona')
150+
148151
% Check which fields are present in a series
149152
field_names = weather.fields()
150153

0 commit comments

Comments
 (0)