diff --git a/mao_merge_45m/power_meter.py b/mao_merge_45m/power_meter.py index ce26c02..88e8db8 100644 --- a/mao_merge_45m/power_meter.py +++ b/mao_merge_45m/power_meter.py @@ -108,7 +108,7 @@ def convert( df_["num_max"] = df_.groupby("time").max()["num"] df_.reset_index(inplace=True) - df_["s"] = (df_["num"]-1) / df_["num_max"] * 1000 + df_["s"] = (df_["num"] - 1) / df_["num_max"] * 1000 df_["time"] = df_["time"] + pd.to_timedelta(np.array(df_["s"]), unit="ms") df_.set_index(df_["time"], inplace=True) diff --git a/tests/test_power_meter.py b/tests/test_power_meter.py index 53924d5..33e81be 100644 --- a/tests/test_power_meter.py +++ b/tests/test_power_meter.py @@ -12,6 +12,7 @@ # constants TEST_CSV = Path("data") / "power_meter_2022144230000Z.csv" + # test function def test_convert() -> None: """Test whether the data of a CSV file is correctly parsed."""