diff --git a/dpbench/infrastructure/reporter.py b/dpbench/infrastructure/reporter.py index 693f3d8d..7f4864cf 100644 --- a/dpbench/infrastructure/reporter.py +++ b/dpbench/infrastructure/reporter.py @@ -199,21 +199,24 @@ def generate_performance_report( .where(dm.Result.run_id == run_id) ) - df = pd.read_sql_query( - sql=sql, - con=conn.connect(), + df = ( + pd.read_sql_query(sql=sql, con=conn.connect()) + .astype({impl: "string" for impl in implementations}) + .fillna("n/a") ) for index, row in df.iterrows(): for impl in implementations: time = row[impl] - if time: - NANOSECONDS_IN_MILISECONDS: Final[float] = 1000 * 1000.0 - time /= NANOSECONDS_IN_MILISECONDS - time = str(round(time, 2)) + "ms" - else: - time = "n/a" + if time == "n/a": + pass + + NANOSECONDS_IN_MILISECONDS: Final[float] = 1000 * 1000.0 + time = float(time) + time /= NANOSECONDS_IN_MILISECONDS + + time = str(round(time, 2)) + "ms" df.at[index, impl] = time