Skip to content

Commit 1a7c56c

Browse files
committed
Replace kwargs with explicitly named arguments
1 parent 2bff6da commit 1a7c56c

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

influxdb/_dataframe_client.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,44 @@ def write_points(self,
132132
protocol=protocol)
133133
return True
134134

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):
136145
"""
137146
Quering data into a DataFrame.
138147
139148
: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.
140162
: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`
143165
"""
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)
145173
if query.strip().upper().startswith("SELECT"):
146174
if len(results) > 0:
147175
return self._to_dataframe(results, dropna)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy