From 901c0e4bed0d354ca4f89af797cc34e4e3c1be8b Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Thu, 12 Nov 2026 15:47:33 +0000 Subject: [PATCH] Fix inplace deprecation for pandas 4 --- docs/release_notes.rst | 1 + src/viresclient/_data_handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index 0f74f3f..c0545bc 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -9,6 +9,7 @@ Changes from 0.16.0 to 0.17.0 - Added new `STRxEPF `_ product - Per-CHU variables in ``STR_EPF`` are given a shared ``CHU`` dimension (labelled 1, 2, 3) in xarray, and expanded to ``_1``, ``_2``, ``_3`` in pandas with ``expand=True`` +- Minor fix for pandas 4, `PDEP-8 `_ Changes from 0.15.2 to 0.16.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/viresclient/_data_handling.py b/src/viresclient/_data_handling.py index 06370ef..3a3f340 100644 --- a/src/viresclient/_data_handling.py +++ b/src/viresclient/_data_handling.py @@ -448,7 +448,7 @@ def make_pandas_DataFrame_from_csv(csv_filename, time_variable="Timestamp"): df[col] = df[col].apply( lambda x: [float(y) for y in x.strip("{}").split(";")] ) - df.set_index(time_variable, inplace=True) + df = df.set_index(time_variable) return df