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.4.0.tar.gz (14.8 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.4.0-cp312-cp312-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.12Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for parquet_to_excel-0.4.0.tar.gz
Algorithm Hash digest
SHA256 272d1d817a0b11c83a4b45aa8b44b02967df38097d3e0a52e606c7589abbed7c
MD5 fff27083253ea19ee13fca03ce36d8b4
BLAKE2b-256 54db3fdc985feb1834ad2d0106a402a9a36a80775c7e68b9b6d4eb586d37bc03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for parquet_to_excel-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dc75ae24221a895bbec1ea6bca2eb822a572a157e81c3880a05fca7493f29aca
MD5 3d1d7fa1b6866cfa1001c5aa75c0ce63
BLAKE2b-256 09511b89b7de59f6884d622c5cfdbf6342cc4ec69f4a058e8a4793054f5b0c32

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