@@ -797,9 +797,10 @@ def df_to_dab_dto_list(self, df: pd.DataFrame) -> list[d_dtos.CircuitDabDTO]:
797797
798798 logger .info (f"The study '{ self ._dab_config .circuit_study_name } ' contains { len (df )} trials." )
799799
800- for index , _ in df .iterrows ():
801- transistor_dto_1 = d_sets .HandleTransistorDto .tdb_to_transistor_dto (df ["params_transistor_1_name_suggest" ][index ])
802- transistor_dto_2 = d_sets .HandleTransistorDto .tdb_to_transistor_dto (df ["params_transistor_2_name_suggest" ][index ])
800+ for idx , _ in df .iterrows ():
801+ index = int (str (idx ))
802+ transistor_dto_1 = d_sets .HandleTransistorDto .tdb_to_transistor_dto (str (df .at [index , "params_transistor_1_name_suggest" ]))
803+ transistor_dto_2 = d_sets .HandleTransistorDto .tdb_to_transistor_dto (str (df .at [index , "params_transistor_2_name_suggest" ]))
803804
804805 dab_dto = d_sets .HandleDabDto .init_config (
805806 name = str (df ["number" ][index ].item ()),
@@ -963,7 +964,7 @@ def pareto_front_from_df(df: pd.DataFrame, x: str = "values_0", y: str = "values
963964 y_vec = df [y ][~ np .isnan (df [x ])]
964965 numpy_zip = np .column_stack ((x_vec , y_vec ))
965966 pareto_tuple_mask_vec = CircuitOptimization .is_pareto_efficient (numpy_zip )
966- pareto_df = df [~ np .isnan (df [x ])][pareto_tuple_mask_vec ]
967+ pareto_df : pd . DataFrame = df [~ np .isnan (df [x ])][pareto_tuple_mask_vec ]
967968 return pareto_df
968969
969970 @staticmethod
@@ -1007,7 +1008,7 @@ def filter_df(df: pd.DataFrame, x: str = "values_0", y: str = "values_1", factor
10071008 # clip losses to a maximum of the minimum losses
10081009 ref_loss_max = np .clip (ref_loss_max , a_min = - 1 , a_max = factor_max_dc_losses * min_total_dc_losses )
10091010
1010- pareto_df_offset = df [df [y ] < ref_loss_max ]
1011+ pareto_df_offset : pd . DataFrame = df [df [y ] < ref_loss_max ]
10111012
10121013 return pareto_df_offset
10131014
0 commit comments