From adb70d384e2617089e56e0916c935c174aa53e92 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Fri, 21 Oct 2022 11:13:41 +0200 Subject: [PATCH] fixed a potential pandas.UserWarning in `select_hdr_data()` --- src/sensospot_tools/__init__.py | 2 +- src/sensospot_tools/hdr.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sensospot_tools/__init__.py b/src/sensospot_tools/__init__.py index b5e1cd3..7ab193b 100644 --- a/src/sensospot_tools/__init__.py +++ b/src/sensospot_tools/__init__.py @@ -3,7 +3,7 @@ Some small tools for working with parsed Sensospot data. """ -__version__ = "0.1.0" +__version__ = "0.1.1" from .hdr import normalize, select_hdr_data # noqa: F401 from .selection import split, select # noqa: F401 diff --git a/src/sensospot_tools/hdr.py b/src/sensospot_tools/hdr.py index 3214dc5..bc29686 100644 --- a/src/sensospot_tools/hdr.py +++ b/src/sensospot_tools/hdr.py @@ -47,7 +47,6 @@ def select_hdr_data( Raises: KeyError: if any column does not exist in the data fram """ - check_columns_exist(data, spot_id_columns, time_column, overflow_column) spot_ids = ensure_list(spot_id_columns) @@ -62,7 +61,7 @@ def select_hdr_data( for next_higher_time in indexed_data_by_time: selection = hdr_data[overflow_column] not_in_overlow = hdr_data.loc[~selection].copy() - replacement_for_overlow = next_higher_time[selection].copy() + replacement_for_overlow = next_higher_time.loc[selection].copy() hdr_data = pandas.concat((not_in_overlow, replacement_for_overlow)) return hdr_data.reset_index()