Solved by nielsr in post #4 
              
              
                So you want to know the number of rows for every example in the batch? You can probably take the max of the unique row IDs in the token type ids created by TapasTokenizer. Small example: 
from transformers import TapasTokenizer
import pandas as pd

model_name = 'google/tapas-base-finetuned-wtq'
toke…