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: