Load previously-saved data

This commit is contained in:
Cyber MacGeddon 2024-07-25 21:43:55 +01:00
parent 7d864fe370
commit d626ab904d
5 changed files with 350 additions and 4 deletions

View file

@ -1,12 +1,24 @@
#!/usr/bin/env python3
import pyarrow as pa
import pyarrow.csv as pc
import pyarrow.parquet as pq
import pandas as pd
import sys
df = None
for file in sys.argv[1:]:
table = pq.read_table(file).to_pandas()
print(table)
part = pq.read_table(file).to_pandas()
if df is None:
df = part
else:
df = pd.concat([df, part], ignore_index=True)
if df is not None:
table = pa.Table.from_pandas(df)
pc.write_csv(table, sys.stdout.buffer)