vaishali commited on
Commit
8997e0d
1 Parent(s): a7ded55

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -0
README.md CHANGED
@@ -34,4 +34,23 @@ dataset_info:
34
  ---
35
  # Dataset Card for "spider-tableQA"
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
34
  ---
35
  # Dataset Card for "spider-tableQA"
36
 
37
+ # Usage
38
+ ```
39
+ import pandas as pd
40
+ from datasets import load_dataset
41
+
42
+ spider_tableQA = load_dataset("vaishali/spider-tableQA")
43
+
44
+ for sample in spider_tableQA['train']:
45
+ question = sample['question']
46
+ sql_query = sample['query']
47
+ input_table_names = sample["table_names"]
48
+ input_tables = [pd.read_json(table, orient='split') for table in sample['tables']]
49
+ answer = pd.read_json(sample['answer'], orient='split')
50
+
51
+ # flattened input/output
52
+ input_to_model = sample["source"]
53
+ target = sample["target"]
54
+ ```
55
+
56
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)