diff --git a/src/ert/resources/workflows/jobs/internal-gui/scripts/csv_export.py b/src/ert/resources/workflows/jobs/internal-gui/scripts/csv_export.py index bb93b7508fa..a9f75831923 100644 --- a/src/ert/resources/workflows/jobs/internal-gui/scripts/csv_export.py +++ b/src/ert/resources/workflows/jobs/internal-gui/scripts/csv_export.py @@ -115,7 +115,7 @@ def run( if drop_const_cols: data = data.loc[:, (data != data.iloc[0]).any()] - data.to_csv(output_file) + data.to_csv(output_file, float_format="%.6f") export_info = ( f"Exported {len(data.index)} rows and {len(data.columns)} " diff --git a/tests/ert/ui_tests/gui/test_csv_export.py b/tests/ert/ui_tests/gui/test_csv_export.py index e7d523b4c9b..b40cbb0c2b1 100644 --- a/tests/ert/ui_tests/gui/test_csv_export.py +++ b/tests/ert/ui_tests/gui/test_csv_export.py @@ -73,7 +73,7 @@ def verify_exported_content(file_name, gui, ensemble_select): for i in range(ensemble.ensemble_size): assert ( - f",{name},{gen_kw_data.iloc[i]['COEFFS:a']},{gen_kw_data.iloc[i]['COEFFS:b']},{gen_kw_data.iloc[i]['COEFFS:c']},{misfit_data.iloc[i]['MISFIT:POLY_OBS']},{misfit_data.iloc[i]['MISFIT:TOTAL']}" + f",{name},{gen_kw_data.iloc[i]['COEFFS:a']:.6f},{gen_kw_data.iloc[i]['COEFFS:b']:.6f},{gen_kw_data.iloc[i]['COEFFS:c']:.6f},{misfit_data.iloc[i]['MISFIT:POLY_OBS']:.6f},{misfit_data.iloc[i]['MISFIT:TOTAL']:.6f}" in file_content )