diff --git a/powerplantmatching/matching.py b/powerplantmatching/matching.py index 0d95018..ea9a4f2 100644 --- a/powerplantmatching/matching.py +++ b/powerplantmatching/matching.py @@ -287,7 +287,12 @@ def reduce_matched_dataframe(df, show_orig_names=False, config=None): "DateRetrofit": "max", "DateOut": "max", "projectID": lambda x: dict(x.droplevel(0).dropna()), - "eic_code": set, + "EIC": lambda x: { + v + for val in x.dropna() + for v in (val if isinstance(val, set) else [val]) + if isinstance(v, str) + }, } ) props_for_groups = pd.Series(props_for_groups)[cols].to_dict()