Datasets:
siyue commited on
Commit ·
3f6e4c0
1
Parent(s): 84e2362
download
Browse files
squall.py
CHANGED
|
@@ -236,8 +236,12 @@ class Squall(datasets.GeneratorBasedBuilder):
|
|
| 236 |
for sample in set:
|
| 237 |
cols = {}
|
| 238 |
keys = ["raw_header", "tokenized_header", "column_suffixes", "column_dtype", "example"]
|
|
|
|
| 239 |
for k in range(5):
|
| 240 |
-
|
|
|
|
|
|
|
|
|
|
| 241 |
sql = [x[1] for x in sample["sql"]]
|
| 242 |
yield idx, {
|
| 243 |
"nt": sample["nt"],
|
|
|
|
| 236 |
for sample in set:
|
| 237 |
cols = {}
|
| 238 |
keys = ["raw_header", "tokenized_header", "column_suffixes", "column_dtype", "example"]
|
| 239 |
+
L = len(sample["columns"])
|
| 240 |
for k in range(5):
|
| 241 |
+
tmp = []
|
| 242 |
+
for j in range(L):
|
| 243 |
+
tmp.append(sample["columns"][j])
|
| 244 |
+
cols[keys[k]] = tmp
|
| 245 |
sql = [x[1] for x in sample["sql"]]
|
| 246 |
yield idx, {
|
| 247 |
"nt": sample["nt"],
|