From f85b33a4cd2b94723f88e9eee18c751bcb7abc25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:17:56 +0000 Subject: [PATCH 1/2] Bump pandas[excel] from 2.0.3 to 2.1.1 Bumps [pandas[excel]](https://github.com/pandas-dev/pandas) from 2.0.3 to 2.1.1. - [Release notes](https://github.com/pandas-dev/pandas/releases) - [Commits](https://github.com/pandas-dev/pandas/compare/v2.0.3...v2.1.1) --- updated-dependencies: - dependency-name: pandas[excel] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index eb0154f..5bc98f8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -87,7 +87,7 @@ packaging==23.1 # black # build # pytest -pandas[excel]==2.0.3 +pandas[excel]==2.1.1 # via datahub (pyproject.toml) pandas-stubs==2.0.2.230605 # via datahub (pyproject.toml) diff --git a/requirements.txt b/requirements.txt index 897adba..75cdcb1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,7 +32,7 @@ openpyxl==3.1.2 # via pandas orjson==3.9.2 # via datahub (pyproject.toml) -pandas[excel]==2.0.3 +pandas[excel]==2.1.1 # via datahub (pyproject.toml) pydantic==1.10.10 # via fastapi From 2d9f3d578bb52d66b5e29c82fe5222c510fbb193 Mon Sep 17 00:00:00 2001 From: Adrian D'Alessandro Date: Tue, 3 Oct 2023 17:39:30 +0100 Subject: [PATCH 2/2] 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..f5c4e9e 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") # type: ignore[attr-defined] # noqa: E501 return df