Skip to content

Commit 7d023e2

Browse files
contain substring for all *Name
Signed-off-by: Jerry Guo <[email protected]>
1 parent c1772e3 commit 7d023e2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/power_grid_model_io/data_stores/excel_file_store.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ def sheet_loader():
9292
columns = list(preview.columns)
9393
dtype = {}
9494
for col in columns:
95-
if (
96-
col == "Name"
97-
or col == "InObject.Name"
98-
or (isinstance(col, tuple) and (col[0] == "Name" or col[0] == "InObject.Name"))
99-
):
95+
if "Name" in str(col) or (isinstance(col, tuple) and ("Name" in str(col[0]))):
10096
dtype[col] = str
10197
sheet_data = xls_file.parse(xls_sheet_name, header=self._header_rows, dtype=dtype)
10298
sheet_data = self._remove_unnamed_column_placeholders(data=sheet_data)

0 commit comments

Comments
 (0)