IMCtermite/lib/pyarrow_arm/pyarrow_test.py
Mario Fink 3618ed9ee8 -> correction write_table vs. write_data in main.cpp
-> container build of pyarrow (i.a. for armv7l build)
2020-08-05 11:32:02 +02:00

19 lines
410 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import pyarrow.parquet as pq
import pyarrow.csv as pv
csvfile = 'pressureVacuum.csv'
tb = pv.read_csv(csvfile,parse_options=pv.ParseOptions(delimiter=','))
print(tb)
parquetfile = 'pressureVacuum.parquet'
pq.write_table(tb,parquetfile,compression='SNAPPY')
# {NONE, SNAPPY, GZIP, LZO, BROTLI, LZ4, ZSTD}
df = pq.read_table(parquetfile,columns=None)
print(df)