Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Convert relevant columns of fields summary pandas data from str to floats #4595

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "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
Loading