class_docstr: Table Question Answering pipeline using a `ModelForTableQuestionAnswering`. This pipeline is only available in
  PyTorch.
  
  Example:
  
  ```python
  >>> from transformers import pipeline
  
  >>> oracle = pipeline(model="google/tapas-base-finetuned-wtq")
  >>> table = {
  ...     "Repository": ["Transformers", "Datasets", "Tokenizers"],
  ...     "Stars": ["36542", "4512", "3934"],
  ...     "Contributors": ["651", "77", "34"],
  ...     "Programming language": ["Python", "Python", "Rust, Python and NodeJS"],
  ... }
  >>> oracle(query="How many stars does the transformers repository have?", table=table)
  {'answer': 'AVERAGE > 36542', 'coordinates': [(0, 1)], 'cells': ['36542'], 'aggregator': 'AVERAGE'}
  ```
  
  Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)
  
  This tabular question answering pipeline can currently be loaded from [`pipeline`] using the following task
  identifier: `"table-question-answering"`.
  
  The models that this pipeline can use are models that have been fine-tuned on a tabular question answering task.
  See the up-to-date list of available models on
  [huggingface.co/models](https://huggingface.co/models?filter=table-question-answering).
class_docstr_tok: ["Table","Question","Answering","pipeline","using","a","`","ModelForTableQuestionAnswering","`",".","This","pipeline","is","only","available","in","PyTorch",".","Example",":","``","`","python",">",">",">","from","transformers","import","pipeline",">",">",">","oracle","=","pipeline","(","model=","''","google\/tapas-base-finetuned-wtq","''",")",">",">",">","table","=","{","...","``","Repository","''",":","[","``","Transformers","''",",","``","Datasets","''",",","``","Tokenizers","''","]",",","...","``","Stars","''",":","[","``","36542","''",",","``","4512","''",",","``","3934","''","]",",","...","``","Contributors","''",":","[","``","651","''",",","``","77","''",",","``","34","''","]",",","...","``","Programming","language","''",":","[","``","Python","''",",","``","Python","''",",","``","Rust",",","Python","and","NodeJS","''","]",",","...","}",">",">",">","oracle","(","query=","''","How","many","stars","does","the","transformers","repository","have","?","``",",","table=table",")","{","'answer","'",":","'AVERAGE",">","36542","'",",","'coordinates","'",":","[","(","0",",","1",")","]",",","'cells","'",":","[","'36542","'","]",",","'aggregator","'",":","'AVERAGE","'","}","``","`","Learn","more","about","the","basics","of","using","a","pipeline","in","the","[","pipeline","tutorial","]","(","..","\/pipeline_tutorial",")","This","tabular","question","answering","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","table-question-answering","''","`",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","a","tabular","question","answering","task",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=table-question-answering",")","."]
code: def preprocess(
      self,
      pipeline_input,
      sequential=None,
      padding=True,
      truncation=None,
  ):
      if truncation is None:
          if self.type == "tapas":
              truncation = "drop_rows_to_fit"
          else:
              truncation = "do_not_truncate"
  
      table, query = pipeline_input["table"], pipeline_input["query"]
      if table.empty:
          raise ValueError("table is empty")
      if query is None or query == "":
          raise ValueError("query is empty")
      inputs = self.tokenizer(
          table,
          query,
          return_tensors=self.framework,
          truncation=truncation,
          padding=padding,
      )
      inputs["table"] = table
      return inputs
  
file_path: transformers/src/transformers/pipelines/table_question_answering.py
imports: import collections
  import types
  import numpy
  from ..utils import add_end_docstrings, is_tensorflow_probability_available, is_tf_available, is_torch_available, requires_backends
  from .base import PIPELINE_INIT_ARGS, ArgumentHandler, Dataset, Pipeline, PipelineException
label_desc: Use image node_id 6 for calling the TableQuestionAnsweringPipeline obj's underlying member method code with example usage: obj.preprocess(pipeline_input, sequential, padding, truncation) and returns: inputs