From 9cb47340931812c3b68cac3a95edc466af26020f Mon Sep 17 00:00:00 2001 From: YoungSoo Shin Date: Thu, 11 Dec 2025 16:12:51 +0900 Subject: [PATCH] csv_2_plot: fix assignment of 'elapsed_seconds' column to avoid SettingWithCopyWarning Signed-off-by: YoungSoo Shin --- example/logger/csv_2_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/logger/csv_2_plot.py b/example/logger/csv_2_plot.py index c7070aa..16e3b78 100644 --- a/example/logger/csv_2_plot.py +++ b/example/logger/csv_2_plot.py @@ -40,7 +40,7 @@ def plot_power_data(csv_path, output_path, plot_types, sources, x_axis_data = df['timestamp'] if relative_time: start_time = df['timestamp'].iloc[0] - df['elapsed_seconds'] = (df['timestamp'] - start_time).dt.total_seconds() + df.loc[:, 'elapsed_seconds'] = (df['timestamp'] - start_time).dt.total_seconds() x_axis_data = df['elapsed_seconds'] print("X-axis set to relative time (elapsed seconds).") else: