Skip to content

Commit

Permalink
feat: support for writing pandas DataFrame (#79) - readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rolincova committed Apr 29, 2020
1 parent 0cacefc commit 3b47326
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ The batching is configurable by ``write_options``\ :
"""
Write Pandas DataFrame
"""
now = pd.Timestamp.now('UTC')
data_frame = pd.DataFrame(data=[["coyote_creek", 1.0], ["coyote_creek", 2.0]],
index=[now, now + timedelta(hours=1)],
columns=["location", "water_level"])
_now = pd.Timestamp().now('UTC')
_data_frame = pd.DataFrame(data=[["coyote_creek", 1.0], ["coyote_creek", 2.0]],
index=[now, now + timedelta(hours=1)],
columns=["location", "water_level"])
self.write_client.write(bucket.name, record=data_frame, data_frame_measurement_name='h2o_feet',
data_frame_tag_columns=['location'])
_write_client.write(bucket.name, record=data_frame, data_frame_measurement_name='h2o_feet',
data_frame_tag_columns=['location'])
"""
Close client
Expand Down

0 comments on commit 3b47326

Please sign in to comment.