From 8689baf21150f64156ccfd3a53657a3e8cfebdd6 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Tue, 3 Oct 2023 17:39:30 +0100 Subject: [PATCH] Explicitly use nanosecond units when creating opal dataframe There is a bug in pandas https://github.com/pandas-dev/pandas/issues/55374 --- datahub/opal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datahub/opal.py b/datahub/opal.py index c02cd96..7abe589 100644 --- a/datahub/opal.py +++ b/datahub/opal.py @@ -116,7 +116,7 @@ def create_opal_frame() -> pd.DataFrame: An initial Dataframe for the opal data with key frame 0 """ df = pd.DataFrame(0, index=range(1), columns=list(opal_headers.keys())) - df["Time"] = pd.Timestamp(OPAL_START_DATE) + df["Time"] = pd.Timestamp(OPAL_START_DATE).as_unit("ns") return df