Skip to content

Commit

Permalink
Explain why we read from excel twice (equinor#8985)
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeda authored Oct 24, 2024
1 parent a630109 commit 64bbc7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ert/config/design_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def from_config_list(cls, config_list: List[str]) -> "DesignMatrix":
def read_design_matrix(
self,
) -> None:
# Read the parameter names (first row) as strings to prevent pandas from modifying them.
# This ensures that duplicate or empty column names are preserved exactly as they appear in the Excel sheet.
# By doing this, we can properly validate variable names, including detecting duplicates or missing names.
param_names = (
pd.read_excel(
self.xls_filename,
Expand Down

0 comments on commit 64bbc7e

Please sign in to comment.