Skip to content

Commit

Permalink
feat: allow specification of header rows in experiment log file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjholland committed Jan 2, 2025
1 parent 0617e37 commit 28b7a48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyprobe/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,17 +675,24 @@ def load_archive(path: str) -> Cell:
def make_cell_list(
record_filepath: str,
worksheet_name: str,
header_row: int = 0,
) -> List[Cell]:
"""Function to make a list of cell objects from a record of tests in Excel format.
Args:
record_filepath (str): The path to the experiment record .xlsx file.
worksheet_name (str): The worksheet name to read from the record.
header_row (int, optional):
The row number containing the column headers. Defaults to 0.
Returns:
list: The list of cell objects.
"""
record = pl.read_excel(record_filepath, sheet_name=worksheet_name)
record = pl.read_excel(
record_filepath,
sheet_name=worksheet_name,
read_options={"header_row": header_row},
)

n_cells = len(record)
cell_list = []
Expand Down

0 comments on commit 28b7a48

Please sign in to comment.