From cc2408017b2032866f19005b398019cadf790c6a Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 9 Apr 2023 23:13:29 +0200 Subject: [PATCH] Fix filtering by `int64`-type identifiers, see GH-7 --- CHANGES.rst | 1 + phenodata/dwd/pheno.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 436f2cc..4b0a2d8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ phenodata changelog development =========== - Fix ``nearest-station`` with ``--format=json`` +- Fix filtering by ``int64``-type identifiers, see GH-7 2020-12-29 0.11.0 ================= diff --git a/phenodata/dwd/pheno.py b/phenodata/dwd/pheno.py index c845fbf..1c57f15 100644 --- a/phenodata/dwd/pheno.py +++ b/phenodata/dwd/pheno.py @@ -372,7 +372,8 @@ def flux(self, results, criteria=None): continue reference = results[field] if key in criteria and criteria[key]: - expression &= reference.isin(criteria[key]) + values = map(int, criteria[key]) + expression &= reference.isin(values) # Apply filter expression to DataFrame if type(expression) is not bool: