Skip to main content

a crate to convert parquet file(s) to an/a excel/csv file with constant memory in rust

Project description

parquet_to_excel

A tool to convert parquet file to an/a excel/csv file in rust with constant memory, both a single parquet file and a folder of parquet files are supported. You can also use python or rust to call it. The python package name is parquet_to_excel too. you can install it by pip install parquet_to_excel. If you could not install this package correctly, you can try to install rust and maturin (pip install maturin) first. Then you can try again.

Functions

  1. parquet_file_to_csv: convert a single parquet file to a csv file
  2. parquet_files_to_csv: convert a folder of parquet files to a csv file
  3. parquet_file_to_xlsx: convert a single parquet file to an excel file
  4. parquet_files_to_xlsx: convert a folder of parquet files to an excel file

Python Examples

  1. parquet to csv
from parquet_to_excel import parquet_file_to_csv, parquet_files_to_csv

parquet_file_to_csv(
    r"D:\Projects\RustTool\data\.duck\yo_dxzh\source=zzz.xlsx\data.parquet", 
    r"D:\Felix\Desktop\out1.csv", 
    header_labels={"ddbm": "地点编码"},
    select_columns=set(["sheet", "yjkm", "yjkmsm"]))

parquet_files_to_csv(
    r"D:\Projects\RustTool\data\.duck\yo_dxzh", 
    r"D:\Felix\Desktop\out2.csv", 
    header_labels={"ddbm": "地点编码"},
    select_columns=set(["sheet", "yjkm", "yjkmsm"]))
  1. parquet to xlsx
from parquet_to_excel import parquet_file_to_xlsx, parquet_files_to_xlsx

# write all data into one sheet
parquet_file_to_xlsx(
    r"D:\Projects\RustTool\data\.duck\yo_dxzh\source=合并报表公司主体及内部客商编码(管理责任人:刘露).xlsx\data.parquet", 
    r"D:\Felix\Desktop\out1.xlsx", 
    sheet_name="data", 
    header_labels={"ddbm": "地点编码"},
    select_columns=set(["sheet", "yjkm", "yjkmsm"]))

# write all data into different sheets by the value of column "sheet"
parquet_files_to_xlsx(
    r"D:\Projects\RustTool\data\.duck\yo_dxzh", 
    r"D:\Felix\Desktop\out2.xlsx", 
    sheet_column = "sheet", 
    header_labels={"ddbm": "地点编码"},
    select_columns=set(["sheet", "yjkm", "yjkmsm"]))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parquet_to_excel-0.7.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parquet_to_excel-0.7.0-cp312-cp312-win_amd64.whl (11.5 MB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file parquet_to_excel-0.7.0.tar.gz.

File metadata

  • Download URL: parquet_to_excel-0.7.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for parquet_to_excel-0.7.0.tar.gz
Algorithm Hash digest
SHA256 1b80887b61e7b234c588006a5be7980bef85ef2243d689244a29f5f9935d248c
MD5 4cb7f8a15fc503012465a4e7bc5f7378
BLAKE2b-256 8ae3f900bafb91f822f59fe4878542ad3827b7978782353788b4b4cfbf8bc116

See more details on using hashes here.

File details

Details for the file parquet_to_excel-0.7.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for parquet_to_excel-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bc4ef4418a6506405e71390423f80c74aae625070fc698f8655e1a260c6b5727
MD5 472fc7ca8e3ff331f90c59d9298b09a7
BLAKE2b-256 21d60e2b168cf79565c20f9f6150a4d8281d1288f3e741e791ad4c823e6d26a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page