From 95e312405e2b8ff1c39fe1d6ca9842263cbca4d1 Mon Sep 17 00:00:00 2001 From: lars20070 Date: Fri, 2 Feb 2024 17:45:53 +0100 Subject: [PATCH 1/3] silence pandas 3.0 warning --- influxdb_client/client/write/dataframe_serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb_client/client/write/dataframe_serializer.py b/influxdb_client/client/write/dataframe_serializer.py index 98262526..6121171f 100644 --- a/influxdb_client/client/write/dataframe_serializer.py +++ b/influxdb_client/client/write/dataframe_serializer.py @@ -234,7 +234,7 @@ def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION for k, v in dict(data_frame.dtypes).items(): if k in data_frame_tag_columns: - data_frame.replace({k: ''}, np.nan, inplace=True) + data_frame = data_frame.replace({k: ''}, np.nan) self.data_frame = data_frame self.f = f From fde1207b3c5fbbd4cae97baf6ce8f22f10c1c4e2 Mon Sep 17 00:00:00 2001 From: lars20070 Date: Fri, 2 Feb 2024 17:52:50 +0100 Subject: [PATCH 2/3] add to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5b10565..9ca8eb7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Bug Fixes +1. Pandas 3.0 warning silenced + ## 1.41.0 [unreleased] ### Bug Fixes From 094f7ba582f4a5f072c03a86c6b299424a8d8669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Mon, 5 Feb 2024 11:16:07 +0100 Subject: [PATCH 3/3] docs: Update CHANGELOG.md --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca8eb7f..e542413a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,8 @@ -### Bug Fixes -1. Pandas 3.0 warning silenced - ## 1.41.0 [unreleased] ### Bug Fixes 1. [#636](https://github.com/influxdata/influxdb-client-python/pull/636): Handle missing data in data frames -2. [#638](https://github.com/influxdata/influxdb-client-python/pull/638): Refactor DataFrame operations to avoid chained assignment and resolve FutureWarning in pandas, ensuring compatibility with pandas 3.0. +2. [#638](https://github.com/influxdata/influxdb-client-python/pull/638), [#642](https://github.com/influxdata/influxdb-client-python/pull/642): Refactor DataFrame operations to avoid chained assignment and resolve FutureWarning in pandas, ensuring compatibility with pandas 3.0. ### Documentation 1. [#639](https://github.com/influxdata/influxdb-client-python/pull/639): Use Markdown for `README`