AI-SDC / ACRO

Tools for the Automatic Checking of Research Outputs. These are the tools for researchers to use as drop-in replacements for commands that produce outputs in Stata Python and R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updates to table suppression

jim-smith opened this issue · comments

  • marginal totals should be totals of non-suppressed cells
  • assert row_total=column_total and set this to table total
  • suggest for now do not provide columns/rows with subtotals for different groups within a hierarch if index or columns is a vector of factors
  • Suppressed cells could have the text f'<{N}" inserted at the last minute?

write unit test to check that subtotals are not taking into account suppressed values.
then

  1. if they are we might have to set the suppressed values to zero, calculate subtotals on the altered table, then replace 0s back to NaN in the results data frame.
    or
  2. manually add/edit marginal rows/columns in the data frame just before we return it, but that could be complex??
    or
    3 . after we have calculate the masks, each cell to be suppressed represents a boolean condition on the data,
    so maybe it is easier to negate them and then use pandas queries to remove those data items - but it might mess yp what we pass to the viewer
    probably try 2 first