Skip to main content

No project description provided

Project description

Arrow table dict conversion

A Python package for converting dictionaries to Apache Arrow tables, and vice versa.

Installation

pip install arrow-table-dict-conversion

Usage

From dict to table:

from arrow_table_dict_conversion import dict_to_pa_table

data = {
    "col1": [1, 2, 3],
    "col2": ["a", "b", "c"]
}

table = dict_to_pa_table(data)
print(table)

From table to dict:

from arrow_table_dict_conversion import unpack_pa_table_dict

# Create an example Arrow table
data = {
    "col1": [1, 2, 3],
    "col2": ["a", "b", "c"]
}
table = pa.table(data)
# Convert Arrow table back to dict
result_dict = unpack_pa_table_dict(table)
print(result_dict)

Requirements

  • Python 3.7+
  • pyarrow

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

arrow_table_dict_conversion-0.1.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

arrow_table_dict_conversion-0.1.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file arrow_table_dict_conversion-0.1.3.tar.gz.

File metadata

File hashes

Hashes for arrow_table_dict_conversion-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b166a76e116f838ab483b69ddb5e815912de4eb3fe755add8e6850390b349edd
MD5 3da4bd604eb7e5518dc9dde803a42bc6
BLAKE2b-256 c59ac9745bdfa643757e00205b350009e8134bf5b8322d5807f12cf23690e0c1

See more details on using hashes here.

File details

Details for the file arrow_table_dict_conversion-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for arrow_table_dict_conversion-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 de0aead7edb5e5cc9382d6557dc5c9a73e47f64b570039fcbe3a22d6ec36b3ac
MD5 443a551ca51640da27f5f1274258ec4f
BLAKE2b-256 cc07d84bfa54cedca095c5eaf9eaf9cda1ac84ab7f6616d89641eb4f618db67f

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