From 09d25dc8520809fb751f1354afb492a191ffcba6 Mon Sep 17 00:00:00 2001 From: Federica Donald Date: Tue, 27 Oct 2026 11:57:43 +0000 Subject: [PATCH] Make export_to_pandas output independent of the pandas version pandas 3.1.0 changed how a timedelta column is displayed: every value is now padded to microseconds (0 days 10:00:00.000000), where 2.x and 3.0.x print whole seconds as 0 days 10:00:00. The e2e runner installs pandas unpinned, so the Python leg started failing against the golden output. Format the time column with str() per Timedelta, which gives the same text on pandas 2.3.3, 3.0.6 and 3.1.0 and matches the existing golden file unchanged. --- snippets/python/data-access/export_to_pandas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snippets/python/data-access/export_to_pandas.py b/snippets/python/data-access/export_to_pandas.py index 413c1cb..e165296 100644 --- a/snippets/python/data-access/export_to_pandas.py +++ b/snippets/python/data-access/export_to_pandas.py @@ -89,7 +89,8 @@ df["time"] = pd.to_timedelta(df["timestamp_ns"], unit="ns") print(f"DataFrame: {len(df)} rows") - print(df.head(10).to_string(index=False)) + # Format each Timedelta on its own: pandas 3.1 pads a whole column to microseconds. + print(df.head(10).to_string(index=False, formatters={"time": str})) print(f"\nDescribe:\n{df[param_id].describe()}") finally: if pda is not None: