From c7ab4bfe106bba2ab1acc557e34ae705111f77ac Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Tue, 4 Jun 2024 00:28:32 +0200 Subject: [PATCH] Fix foreign key parsing bug --- src/oemof/tabular/datapackage/building.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oemof/tabular/datapackage/building.py b/src/oemof/tabular/datapackage/building.py index 412c17d1..0613c093 100644 --- a/src/oemof/tabular/datapackage/building.py +++ b/src/oemof/tabular/datapackage/building.py @@ -147,7 +147,7 @@ def infer_resource_foreign_keys(resource, sequences_profiles_to_resource): for field in r.schema.fields: if field.type == "string": - for potential_fk in data.dropna()[field.name].unique(): + for potential_fk in data[field.name].dropna().unique(): if potential_fk in sequences_profiles_to_resource: # this is actually a wrong format and should be