Skip to content

Commit

Permalink
Update report generation methods for external code compatibility (OSO…
Browse files Browse the repository at this point in the history
…ceanAcoustics#314)

* Fix sex-ordering in output tables

* Set row and column names to intersect on "0" for age-length tables
  • Loading branch information
brandynlucca authored Dec 5, 2024
1 parent 3067a55 commit f673e0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions echopop/extensions/feat_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def append_datatable_rows(worksheet: Worksheet, dataframe: pd.DataFrame) -> None
"""

# Add column names (i.e. age)
worksheet.append([""] + dataframe.columns.values.tolist())
worksheet.append([0] + dataframe.columns.values.tolist())

# Get the dataset row indices
ROW_INDICES = dataframe.index.values
Expand Down Expand Up @@ -413,7 +413,7 @@ def write_age_length_table_report(
wb = initialize_workbook(filepath)

# Iterate through all sexes
for sex in ["all", "female", "male"]:
for sex in ["male", "female", "all"]:

# Subset the data dictionary for the particular sheet
sheet_data = tables_dict[sex]
Expand Down Expand Up @@ -452,7 +452,7 @@ def write_haul_report(
wb = initialize_workbook(filepath)

# Iterate through all sexes
for sex in ["all", "female", "male"]:
for sex in ["male", "female", "all"]:

# Subset the data dictionary for the particular sheet
sheet_data = tables_dict[sex]
Expand Down

0 comments on commit f673e0a

Please sign in to comment.