diff --git a/influxdb/_dataframe_client.py b/influxdb/_dataframe_client.py index e7ae9c17..1363cbf0 100644 --- a/influxdb/_dataframe_client.py +++ b/influxdb/_dataframe_client.py @@ -305,7 +305,7 @@ def _convert_dataframe_to_json(dataframe, 'time': np.int64(ts.value / precision_factor)} for ts, tag, (_, rec) in zip( dataframe.index, - dataframe[tag_columns].to_dict('record'), + dataframe[tag_columns].to_dict('records'), dataframe[field_columns].iterrows() ) ] diff --git a/influxdb/client.py b/influxdb/client.py index df9ef966..38590b1d 100644 --- a/influxdb/client.py +++ b/influxdb/client.py @@ -561,7 +561,8 @@ def write_points(self, :type points: (if protocol is 'json') list of dicts, where each dict represents a point. (if protocol is 'line') sequence of line protocol strings. - :param time_precision: Either 's', 'm', 'ms' or 'u', defaults to None + :param time_precision: Either 'n', 'u', 'ms', 's', 'm' or 'h', + defaults to None :type time_precision: str :param database: the database to write the points to. Defaults to the client's current database @@ -1177,7 +1178,8 @@ def send_packet(self, packet, protocol='json', time_precision=None): (if protocol is 'line') list of line protocol strings :param protocol: protocol of input data, either 'json' or 'line' :type protocol: str - :param time_precision: Either 's', 'm', 'ms' or 'u', defaults to None + :param time_precision: Either 'n', 'u', 'ms', 's', 'm' or 'h', + defaults to None :type time_precision: str """ if protocol == 'json':