File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,12 @@ def series_representation(
260260 for res in self .measurements
261261 ]
262262
263+ #
264+ entities_constitutive_properties_series = {
265+ entity .identifier : entity .seriesRepresentation (constitutiveOnly = True )
266+ for entity in self .entities
267+ }
268+
263269 #
264270 measurement_series = []
265271 occurrences = {}
@@ -278,7 +284,13 @@ def series_representation(
278284 "result_index" : result_index ,
279285 }
280286 )
281- measurement_series .append (pd .concat ([req , s ]))
287+
288+ # We are dealing with Series, so we want to avoid duplicate keys
289+ # The only keys that can clash are the ones between the entities'
290+ # constitutive properties and the ones coming from the MeasurementResult
291+ e = entities_constitutive_properties_series [s ["identifier" ]]
292+ e = e [e .index .difference (s .keys ())]
293+ measurement_series .append (pd .concat ([req , e , s ]))
282294
283295 return measurement_series
284296
You can’t perform that action at this time.
0 commit comments