class_docstr: Methods for analyzing a square contingency table.
  
  Parameters
  ----------
  table : array_like
      A square contingency table, or DataFrame that is converted
      to a square form.
  shift_zeros : bool
      If True and any cell count is zero, add 0.5 to all values
      in the table.
  
  Notes
  -----
  These methods should only be used when the rows and columns of the
  table have the same categories.  If `table` is provided as a
  Pandas DataFrame, the row and column indices will be extended to
  create a square table, inserting zeros where a row or column is
  missing.  Otherwise the table should be provided in a square form,
  with the (implicit) row and column categories appearing in the
  same order.
class_docstr_tok: ["Methods","for","analyzing","a","square","contingency","table",".","Parameters","--","--","--","--","--","table",":","array_like","A","square","contingency","table",",","or","DataFrame","that","is","converted","to","a","square","form",".","shift_zeros",":","bool","If","True","and","any","cell","count","is","zero",",","add","0.5","to","all","values","in","the","table",".","Notes","--","--","-","These","methods","should","only","be","used","when","the","rows","and","columns","of","the","table","have","the","same","categories",".","If","`","table","`","is","provided","as","a","Pandas","DataFrame",",","the","row","and","column","indices","will","be","extended","to","create","a","square","table",",","inserting","zeros","where","a","row","or","column","is","missing",".","Otherwise","the","table","should","be","provided","in","a","square","form",",","with","the","(","implicit",")","row","and","column","categories","appearing","in","the","same","order","."]
code: def __init__(self, table, shift_zeros=True):
      table = _make_df_square(table)  # Non-pandas passes through
      k1, k2 = table.shape
      if k1 != k2:
          raise ValueError("table must be square")
  
      super().__init__(table, shift_zeros)
  
imports: import warnings
  import numpy
  import pandas
  from scipy import stats
  from statsmodels import iolib
  from statsmodels.tools import sm_exceptions
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 1 to create a new SquareTable object from inherited base classes: Table with example: obj = SquareTable(table, shift_zeros)