You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+73-3Lines changed: 73 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ InfluxDB 2.0 client features
43
43
44
44
- Querying data
45
45
- using the Flux language
46
-
- into csv, raw data, `flux_table <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L5>`_ structure
46
+
- into csv, raw data, `flux_table <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L5>`_ structure, `Pandas DataFrame <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html>`_
The API also support streaming ``FluxRecord`` via `query_stream <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/query_api.py#L77>`_, see example below:
305
307
@@ -372,6 +374,57 @@ The API also support streaming ``FluxRecord`` via `query_stream <https://github.
372
374
"""
373
375
client.__del__()
374
376
377
+
Pandas DataFrame
378
+
""""""""""""""""
379
+
.. marker-pandas-start
380
+
381
+
.. note:: Note that if a query returns more then one table then the client generates a ``DataFrame`` for each of them.
382
+
383
+
The ``client`` is able to retrieve data in `Pandas DataFrame <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html>`_ format thought ``query_data_frame``:
384
+
385
+
.. code-block:: python
386
+
387
+
from influxdb_client import InfluxDBClient, Point, Dialect
388
+
from influxdb_client.client.write_api importSYNCHRONOUS
@@ -560,7 +613,7 @@ Efficiency write data from IOT sensor
560
613
.. marker-iot-end
561
614
562
615
Connect to InfluxDB Cloud
563
-
^^^^^^^^^^^^^^^^^^^^^^^^^
616
+
"""""""""""""""""""""""""
564
617
The following example demonstrate a simplest way how to write and query date with the InfluxDB Cloud.
565
618
566
619
At first point you should create an authentication token as is described `here <https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/>`_.
@@ -634,7 +687,24 @@ The last step is run a python script via: ``python3 influx_cloud.py``.
634
687
finally:
635
688
client.close()
636
689
637
-
.. marker-iot-end
690
+
How to use Jupyter + Pandas + InfluxDB 2
691
+
""""""""""""""""""""""""""""""""""""""""
692
+
The first example shows how to use client capabilities to predict stock price via `Keras <https://keras.io>`_, `TensorFlow <https://www.tensorflow.org>`_, `sklearn <https://scikit-learn.org/stable/>`_:
The second example shows how to use client capabilities to realtime visualization via `hvPlot <https://hvplot.pyviz.org>`_, `Streamz <https://streamz.readthedocs.io/en/latest/>`_, `RxPY <https://rxpy.readthedocs.io/en/latest/>`_:
0 commit comments