Skip to content

Commit

Permalink
Handle standalone comments properly
Browse files Browse the repository at this point in the history
These have pd.NA run/proposal numbers.
  • Loading branch information
JamesWrigley committed Jan 17, 2024
1 parent 62358da commit e079437
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions damnit/gui/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ def variable_is_constant(self, run, proposal, quantity):
"""
Check if the variable at the given index is constant throughout the run.
"""
# If the run/proposal is a pd.NA then the row belongs to a standalone comment
if pd.isna(run) or pd.isna(proposal):
return True

is_constant_df = self._main_window.is_constant_df
if quantity in is_constant_df.columns:
return is_constant_df.loc[(proposal, run)][quantity].item()
Expand Down

0 comments on commit e079437

Please sign in to comment.