From 9a0059141b7323a03dfe9d4b919e70d455c68323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levente=20M=C3=A9sz=C3=A1ros?= Date: Tue, 10 Oct 2023 12:31:52 +0200 Subject: [PATCH] python: Fixed filtering the data frame for specific columns for an empty data frame. --- python/inet/test/statistical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/inet/test/statistical.py b/python/inet/test/statistical.py index df25a73383d..25b0a9676eb 100644 --- a/python/inet/test/statistical.py +++ b/python/inet/test/statistical.py @@ -27,7 +27,7 @@ def _read_scalar_result_file(file_name): df = read_result_files(file_name, include_fields_as_scalars=True) df = get_scalars(df, include_runattrs=True) - df = df[["experiment", "measurement", "replication", "module", "name", "value"]] + df = df if df.empty else df[["experiment", "measurement", "replication", "module", "name", "value"]] return df def _write_diff_file(a_file_name, b_file_name, diff_file_name):