From da39921f94a90e330c796e0ad9ff861e9fc5a8af Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Tue, 21 Mar 2017 12:05:48 -0700 Subject: [PATCH 1/3] Add correct protocol to the Pandas client @nicolajkirchhof Is this what you were talking about? --- examples/tutorial_pandas.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tutorial_pandas.py b/examples/tutorial_pandas.py index c9a09fde..91a5634e 100644 --- a/examples/tutorial_pandas.py +++ b/examples/tutorial_pandas.py @@ -8,6 +8,7 @@ def main(host='localhost', port=8086): user = 'root' password = 'root' dbname = 'example' + protocol = 'json' client = DataFrameClient(host, port, user, password, dbname) From 889ef09125a5f1b2dc39e6e42f5532c98d44a746 Mon Sep 17 00:00:00 2001 From: nicolajkirchhof Date: Wed, 22 Mar 2017 19:17:37 +0100 Subject: [PATCH 2/3] Corrected example Tested against influxdb-python version 4.0.0 --- examples/tutorial_pandas.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/tutorial_pandas.py b/examples/tutorial_pandas.py index 91a5634e..86dc48f7 100644 --- a/examples/tutorial_pandas.py +++ b/examples/tutorial_pandas.py @@ -5,9 +5,12 @@ def main(host='localhost', port=8086): + host='localhost' + port=8086 user = 'root' password = 'root' - dbname = 'example' + dbname = 'demo' + # Temporarily used to avoid line protocol time conversion issues #412, #426, #431. protocol = 'json' client = DataFrameClient(host, port, user, password, dbname) @@ -21,16 +24,16 @@ def main(host='localhost', port=8086): client.create_database(dbname) print("Write DataFrame") - client.write_points(df, 'demo') + client.write_points(df, 'demo', protocol=protocol) print("Write DataFrame with Tags") - client.write_points(df, 'demo', {'k1': 'v1', 'k2': 'v2'}) + client.write_points(df, 'demo', {'k1': 'v1', 'k2': 'v2'}, protocol=protocol) print("Read DataFrame") client.query("select * from demo") print("Delete database: " + dbname) - client.delete_database(dbname) + client.drop_database(dbname) def parse_args(): From 449d02eb1b5e2a532d3c323f09195242cf44f2b8 Mon Sep 17 00:00:00 2001 From: nicolajkirchhof Date: Wed, 22 Mar 2017 19:23:58 +0100 Subject: [PATCH 3/3] Removed obsolete code --- examples/tutorial_pandas.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/tutorial_pandas.py b/examples/tutorial_pandas.py index 86dc48f7..855f5740 100644 --- a/examples/tutorial_pandas.py +++ b/examples/tutorial_pandas.py @@ -5,8 +5,6 @@ def main(host='localhost', port=8086): - host='localhost' - port=8086 user = 'root' password = 'root' dbname = 'demo' 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