class_docstr: Base class for testing expected errors for pattern mining.
class_docstr_tok: ["Base","class","for","testing","expected","errors","for","pattern","mining","."]
code: def test_sparsedataframe_notzero_column(self):
      dfs = self.df.astype(pd.SparseDtype("int", 0))
  
      dfs.columns = [i for i in range(len(dfs.columns))]
      self.fpalgo(dfs)
  
      dfs = self.df.astype(pd.SparseDtype("int", 0))
  
      dfs.columns = [i + 1 for i in range(len(dfs.columns))]
      assert_raises(
          ValueError,
          "Due to current limitations in Pandas, "
          "if the sparse format has integer column names,"
          "names, please make sure they either start "
          "with `0` or cast them as string column names: "
          "`df.columns = [str(i) for i in df.columns`].",
          self.fpalgo,
          dfs,
      )
  
imports: import sys
  from contextlib import contextmanager
  from io import StringIO
  import numpy
  import pandas
  from numpy.testing import assert_array_equal
  from packaging.version import Version
  from pandas import __version__
  from scipy.sparse import csr_matrix
  from mlxtend.preprocessing import TransactionEncoder
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 4 for calling the FPTestErrors obj's underlying member method code with example usage: obj.test_sparsedataframe_notzero_column() without return types