Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
1. [#723](https://github.com/influxdata/influxdb-client-python/pull/723): Export public names using generated `__all__` array in `__init__.py` as per reference documentation.
1. [#725](https://github.com/influxdata/influxdb-client-python/pull/725): Start the `WritesRetry` `max_retry_time` at a request's first failure, so a strategy passed as `retries` to `InfluxDBClient` keeps retrying after `max_retry_time` has passed since it was created.
1. [#732](https://github.com/influxdata/influxdb-client-python/pull/732): Apply the `#default` annotation in `FluxCsvParser` when it comes before `#datatype`.
1. [#734](https://github.com/influxdata/influxdb-client-python/pull/734): Match `data_frame_timestamp_column` by exact column name, so a field whose name is part of the timestamp column name (e.g. `Open` with `OpenTime`) is no longer dropped.

## 1.50.0 [2026-01-23]

Expand Down
2 changes: 1 addition & 1 deletion influxdb_client/client/write/dataframe_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION
key_value = f',{key_format}={{str({val_format}).translate(_ESCAPE_KEY)}}'
tags.append(key_value)
continue
elif timestamp_column is not None and key in timestamp_column:
elif timestamp_column is not None and key == timestamp_column:
timestamp_index = field_index
continue

Expand Down
17 changes: 17 additions & 0 deletions tests/test_WriteApiDataFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,23 @@ def test_use_timestamp_from_specified_column(self):
self.assertEqual('test value1=10i,value2=30i 1586044800000000000', points[0])
self.assertEqual('test value1=20i,value2=40i 1588636800000000000', points[1])

def test_timestamp_column_name_contains_field_name(self):
from influxdb_client.extras import pd
data_frame = pd.DataFrame(data={
'OpenTime': ['2020-04-05', '2020-05-05'],
'Open': [10, 20],
'Time': [30, 40],
}, index=['A', 'B'])

points = data_frame_to_list_of_points(data_frame=data_frame,
data_frame_measurement_name="test",
data_frame_timestamp_column="OpenTime",
point_settings=PointSettings())

self.assertEqual(2, len(points))
self.assertEqual('test Open=10i,Time=30i 1586044800000000000', points[0])
self.assertEqual('test Open=20i,Time=40i 1588636800000000000', points[1])

def test_str_format_for_timestamp(self):
from influxdb_client.extras import pd

Expand Down