Skip to content

Commit

Permalink
Convert relevant columns from str to floats
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovecchietti committed Apr 26, 2024
1 parent ed7dab2 commit cda07f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyaedt/modules/PostProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5407,7 +5407,11 @@ def get_field_summary_data(self, setup=None, variation=None, intrinsics="", pand
if pandas_output:
if pd is None:
raise ImportError("pandas package is needed.")
return pd.DataFrame.from_dict(out_dict)
df = pd.DataFrame.from_dict(out_dict)
for col in ["Min", "Max", "Mean", "Stdev", "Area/Volume", "Total"]:
if col in df.columns:
df[col] = df[col].astype(float)
return df
return out_dict

@pyaedt_function_handler(filename="output_file", design_variation="variations", setup_name="setup")
Expand Down

0 comments on commit cda07f3

Please sign in to comment.