class_docstr: A class representing an 2D table (for pretty printing output).
class_docstr_tok: ["A","class","representing","an","2D","table","(","for","pretty","printing","output",")","."]
code: def __getitem__(self, item):
      if is_type(item, int, str):
          # single col selection returns list
          if is_type(item, int):
              index = item
              if index < 0:
                  index += len(self._col_header)
              if index < 0 or index >= len(self._col_header):
                  raise H2OValueError("Index %d is out of range" % item)
          else:
              if item in self._col_header:
                  index = self._col_header.index(item)
              else:
                  raise H2OValueError(
                      "Column `%s` does not exist in the table" % item
                  )
          return [row[index] for row in self._cell_values]
      elif isinstance(item, slice):
          # row selection if item is slice returns H2OTwoDimTable (slice works like pandas DateFrame, not like H2OFrame)
          new_table = copy.deepcopy(self)
          new_table._cell_values = [
              self._cell_values[ii]
              for ii in range(*item.indices(len(self._cell_values)))
          ]
          return new_table
      elif is_type(item, [int, str]):
          # multiple col selection returns list of cols
          return [self[i] for i in item]
      else:
          raise TypeError(
              "can not support getting item for " + str(item)
          )
  
imports: from h2o.utils.compatibility import *
  import copy
  from h2o.display import H2ODisplay, H2OTableDisplay, repr_def
  from h2o.exceptions import H2OValueError
  from h2o.utils.shared_utils import can_use_pandas
  from h2o.utils.typechecks import I, assert_is_type, is_type
label_desc: Use image node_id 8 for calling the H2OTwoDimTable obj's underlying member method code with example usage: obj.__getitem__(item) and returns: unknown, new_table, unknown