code: def from_existing(cls, confusion, *args, **kwargs):
          
          # Extremely brute-force to recreate data from a confusion matrix!
  
          df = []
          for t, p in product(confusion.index.values, confusion.columns.values):
              df += [[t, p]] * confusion[p][t]
          if confusion.index.name is not None and confusion.columns.name is not None:
              return Confusion(pd.DataFrame(df, columns=[confusion.index.name, confusion.columns.name]))
          return Confusion(pd.DataFrame(df))
docs: Creates a confusion matrix from a DataFrame that already contains confusion counts (but not meta stats)
          >>> df = pd.DataFrame(np.matrix([[0,1,2,0,1,2,1,2,2,1],[0,1,2,1,2,0,0,1,2,0]]).T, columns=['True', 'Pred'])
          >>> c = Confusion(df)
          >>> c2 = pd.DataFrame(c)
          >>> hasattr(c2, '_binary_sensitivity')
          False
          >>> c3 = Confusion.from_existing(c2)
          >>> hasattr(c3, '_binary_sensitivity')
          True
          >>> (c3 == c).all().all()
          True
          >>> c3
          Pred  0  1  2
          True
          0     1  1  0
          1     2  1  1
          2     1  1  2