class_docstr: Abstract base class for all data formatters.
  
  User can implement the abstract methods below to perform dataset-specific
  manipulations.
class_docstr_tok: ["Abstract","base","class","for","all","data","formatters",".","User","can","implement","the","abstract","methods","below","to","perform","dataset-specific","manipulations","."]
docstr: Returns formatted column definition in order expected by the TFT.
docstr_tok: ["Returns","formatted","column","definition","in","order","expected","by","the","TFT","."]
code: def get_column_definition(self):
      """Returns formatted column definition in order expected by the TFT."""
  
      column_definition = self._column_definition
  
      # Sanity checks first.
      # Ensure only one ID and time column exist
      def _check_single_column(input_type):
          length = len(
              [tup for tup in column_definition if tup[2] == input_type]
          )
  
          if length != 1:
              raise ValueError(
                  "Illegal number of inputs ({}) of type {}".format(
                      length, input_type
                  )
              )
  
      _check_single_column(InputTypes.ID)
      _check_single_column(InputTypes.TIME)
  
      identifier = [
          tup for tup in column_definition if tup[2] == InputTypes.ID
      ]
      time = [
          tup for tup in column_definition if tup[2] == InputTypes.TIME
      ]
      real_inputs = [
          tup
          for tup in column_definition
          if tup[1] == DataTypes.REAL_VALUED
          and tup[2] not in {InputTypes.ID, InputTypes.TIME}
      ]
      categorical_inputs = [
          tup
          for tup in column_definition
          if tup[1] == DataTypes.CATEGORICAL
          and tup[2] not in {InputTypes.ID, InputTypes.TIME}
      ]
  
      return identifier + time + real_inputs + categorical_inputs
  
file_path: qlib/examples/benchmarks/TFT/data_formatters/base.py
imports: import abc
  import enum
label_desc: Use image node_id 9 for calling the GenericDataFormatter obj's underlying member method code with example usage: obj.get_column_definition() and returns: unknown