Skip to content

Commit 3b47326

Browse files
committed
feat: support for writing pandas DataFrame (#79) - readme
1 parent 0cacefc commit 3b47326

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,13 @@ The batching is configurable by ``write_options``\ :
307307
"""
308308
Write Pandas DataFrame
309309
"""
310-
now = pd.Timestamp.now('UTC')
311-
data_frame = pd.DataFrame(data=[["coyote_creek", 1.0], ["coyote_creek", 2.0]],
312-
index=[now, now + timedelta(hours=1)],
313-
columns=["location", "water_level"])
310+
_now = pd.Timestamp().now('UTC')
311+
_data_frame = pd.DataFrame(data=[["coyote_creek", 1.0], ["coyote_creek", 2.0]],
312+
index=[now, now + timedelta(hours=1)],
313+
columns=["location", "water_level"])
314314
315-
self.write_client.write(bucket.name, record=data_frame, data_frame_measurement_name='h2o_feet',
316-
data_frame_tag_columns=['location'])
315+
_write_client.write(bucket.name, record=data_frame, data_frame_measurement_name='h2o_feet',
316+
data_frame_tag_columns=['location'])
317317
318318
"""
319319
Close client

0 commit comments

Comments
 (0)