@@ -132,16 +132,44 @@ def write_points(self,
132
132
protocol = protocol )
133
133
return True
134
134
135
- def query (self , query , dropna = True , ** kwargs ):
135
+ def query (self ,
136
+ query ,
137
+ params = None ,
138
+ epoch = None ,
139
+ expected_response_code = 200 ,
140
+ database = None ,
141
+ raise_errors = True ,
142
+ chunked = False ,
143
+ chunk_size = 0 ,
144
+ dropna = True ):
136
145
"""
137
146
Quering data into a DataFrame.
138
147
139
148
:param query: the actual query string
149
+ :param params: additional parameters for the request, defaults to {}
150
+ :param epoch: response timestamps to be in epoch format either 'h',
151
+ 'm', 's', 'ms', 'u', or 'ns',defaults to `None` which is
152
+ RFC3339 UTC format with nanosecond precision
153
+ :param expected_response_code: the expected status code of response,
154
+ defaults to 200
155
+ :param database: database to query, defaults to None
156
+ :param raise_errors: Whether or not to raise exceptions when InfluxDB
157
+ returns errors, defaults to True
158
+ :param chunked: Enable to use chunked responses from InfluxDB.
159
+ With ``chunked`` enabled, one ResultSet is returned per chunk
160
+ containing all results within that chunk
161
+ :param chunk_size: Size of each chunk to tell InfluxDB to use.
140
162
:param dropna: drop columns where all values are missing
141
- :param **kwargs: additional parameters for ``InfluxDBClient.query``
142
-
163
+ :returns: the queried data
164
+ :rtype: :class:`~.ResultSet`
143
165
"""
144
- results = super (DataFrameClient , self ).query (query , ** kwargs )
166
+ query_args = dict (params = params ,
167
+ epoch = epoch ,
168
+ expected_response_code = expected_response_code ,
169
+ raise_errors = raise_errors ,
170
+ chunked = chunked ,
171
+ chunk_size = chunk_size )
172
+ results = super (DataFrameClient , self ).query (query , ** query_args )
145
173
if query .strip ().upper ().startswith ("SELECT" ):
146
174
if len (results ) > 0 :
147
175
return self ._to_dataframe (results , dropna )
0 commit comments