test
Browse files- the-vault-function.py +2 -0
the-vault-function.py
CHANGED
@@ -218,12 +218,14 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
|
|
218 |
return generators
|
219 |
|
220 |
def _generate_examples(self, files):
|
|
|
221 |
key = 0
|
222 |
for file_idx, file in enumerate(files):
|
223 |
with open(file, "rb") as f:
|
224 |
parquet_file = pq.ParquetFile(f)
|
225 |
for batch_idx, record_batch in enumerate(parquet_file.iter_batches(batch_size=10_000)):
|
226 |
pa_table = pa.Table.from_batches([record_batch])
|
|
|
227 |
for row_index in range(pa_table.num_rows):
|
228 |
row = pa_table.slice(row_index, 1).to_pydict()
|
229 |
print(row.keys())
|
|
|
218 |
return generators
|
219 |
|
220 |
def _generate_examples(self, files):
|
221 |
+
print(files)
|
222 |
key = 0
|
223 |
for file_idx, file in enumerate(files):
|
224 |
with open(file, "rb") as f:
|
225 |
parquet_file = pq.ParquetFile(f)
|
226 |
for batch_idx, record_batch in enumerate(parquet_file.iter_batches(batch_size=10_000)):
|
227 |
pa_table = pa.Table.from_batches([record_batch])
|
228 |
+
print(pa_table)
|
229 |
for row_index in range(pa_table.num_rows):
|
230 |
row = pa_table.slice(row_index, 1).to_pydict()
|
231 |
print(row.keys())
|