Skip to content

Commit bd930bd

Browse files
committed
Documentation for DataFrameClient
1 parent 3a420f3 commit bd930bd

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ On Debian/Ubuntu, you can install it with this command::
5252
Dependencies
5353
============
5454

55-
The InfluxDB-Python distribution is supported and tested on Python 2.7 and Python 3.3.
55+
The InfluxDB-Python distribution is supported and tested on Python 2.7 and Python 3.4.
5656

57-
Main dependencie is:
57+
Main dependency is:
5858

5959
- Requests: HTTP library for human beings (http://docs.python-requests.org/)
6060

6161

6262
Additional dependencies are:
6363

64+
- pandas: for writing from and reading to DataFrames (http://pandas.pydata.org/)
6465
- Sphinx: Tool to create and manage the documentation (http://sphinx-doc.org/)
6566
- Nose: to auto-discover tests (http://nose.readthedocs.org/en/latest/)
6667
- Mock: to mock tests (https://pypi.python.org/pypi/mock)

docs/source/api-documentation.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ ports. The below instantiation statements are all equivalent::
2020
# using UDP
2121
client = InfluxDBClient(host='127.0.0.1', dbname='dbname', use_udp=True, udp_port=4444)
2222

23+
To write pandas DataFrames or to read data into a
24+
pandas DataFrame, use a :py:class:`~influxdb.misc.DataFrameClient` object.
25+
These clients are initiated in the same way as the
26+
:py:class:`~influxdb.InfluxDBClient`::
27+
28+
from influxdb.misc import DataFrameClient
29+
30+
client = DataFrameClient(host='127.0.0.1', port=8086, username='root', password='root', dbname='dbname')
2331

24-
.. note:: Only when using UDP (use_udp=True) the connections is established.
2532

33+
.. note:: Only when using UDP (use_udp=True) the connections is established.
2634

2735

2836
.. _InfluxDBClient-api:
@@ -36,3 +44,13 @@ ports. The below instantiation statements are all equivalent::
3644
.. autoclass:: influxdb.InfluxDBClient
3745
:members:
3846
:undoc-members:
47+
48+
-----------------------
49+
:class:`DataFrameClient`
50+
-----------------------
51+
52+
53+
.. currentmodule:: influxdb.misc.DataFrameClient
54+
.. autoclass:: influxdb.misc.DataFrameClient
55+
:members:
56+
:undoc-members:

docs/source/examples.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ Tutorials - Basic
1313
.. literalinclude:: ../../examples/tutorial.py
1414
:language: python
1515
:linenos:
16+
17+
Tutorials - pandas
18+
==================
19+
20+
.. literalinclude:: ../../examples/tutorial_pandas.py
21+
:language: python
22+
:linenos:

0 commit comments

Comments
 (0)