Skip to content

Indexing custom tables for Table Question Answering #4274

Discussion options

You must be logged in to vote

Hey @MariaDavid30, you don't need to convert your CSV files into JSON to index them into a DocumentStore. Instead, you can directly create DataFrames from your CSVs using pandas library. Then, you can create Haystack Documents from those DataFrames. One thing you need to keep in mind that as you create Documents, you need to state content_type as table and set the content as the array of each of your tables.

For example, this is a Document created from one table in the tutorial. content is the array of rows of the table and the first item ['Opponent', 'M', 'W', 'L', 'T', 'NR', 'Win%', 'First', 'Last'] is the header of the table:

<Document: {'content': [['Opponent', 'M', 'W', 'L', 'T', 'NR', 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@MariaDavid30
Comment options

Answer selected by MariaDavid30
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants