The following line in function compute_contingency_table:
ctab = pd.crosstab(observed, simulated, dropna=False)
produces ctab containing only True or False for either the observed or the simulated series? It would cause the error in ctab.loc.
Could you add a solution to handle such situation?
Verified if either of the input categorical series contain only True or False, then compute_contingency_table fails with a KeyError for the missing boolean category.
The following line in function compute_contingency_table:
ctab = pd.crosstab(observed, simulated, dropna=False) produces ctab containing only True or False for either the observed or the simulated series? It would cause the error in ctab.loc.
Could you add a solution to handle such situation?