Skip to main content

Fast and memory-efficient PX to CSV converter

Project description

px2csv

Convert PX (PC-Axis) files to CSV fast and memory-efficiently in Python.

We currently support only UTF-8 encoded PX files.

Install from PyPI

pip install px2csv

Convert using file paths

from px2csv import convert
convert("examples/12b4.px", "examples/12b4.csv", include_codes=True, include_labels=True)

For large sparse PX files, skip missing values and avoid repeated label columns:

from px2csv import convert
convert(
	"examples/132g.px",
	"examples/132g.csv",
	include_codes=True,
	include_labels=False,
	skip_empty=True,
)

Convert using file-like objects (streams)

import io
from px2csv import convert
with open("examples/12b4.px", "rb") as fin, open("examples/12b4.csv", "wb") as fout:
	convert(fin, fout, include_codes=True, include_labels=True)

Filter rows while converting (select)

Pass select to keep only the rows you need. Filtering happens inside the C++ converter, so the discarded rows are never materialized.

from px2csv import convert
convert(
	"examples/12b4.px",
	"examples/12b4.csv",
	include_codes=True,
	include_labels=True,
	select={
		"Tiedot": ["arvogwh", "osuuskk"],
		"Vuosi": ["2024", "2023"],
	},
)

select maps a dimension name to the list of value codes to keep; Only rows that match every selected dimension are emitted; dimensions omitted from select are kept in full.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

px2csv-1.1.0-cp314-cp314-win_amd64.whl (306.2 kB view details)

Uploaded CPython 3.14Windows x86-64

px2csv-1.1.0-cp314-cp314-win32.whl (286.9 kB view details)

Uploaded CPython 3.14Windows x86

px2csv-1.1.0-cp314-cp314-musllinux_1_2_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

px2csv-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

px2csv-1.1.0-cp314-cp314-macosx_11_0_arm64.whl (103.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

px2csv-1.1.0-cp313-cp313-win_amd64.whl (297.0 kB view details)

Uploaded CPython 3.13Windows x86-64

px2csv-1.1.0-cp313-cp313-win32.whl (279.2 kB view details)

Uploaded CPython 3.13Windows x86

px2csv-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

px2csv-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

px2csv-1.1.0-cp313-cp313-macosx_11_0_arm64.whl (105.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

px2csv-1.1.0-cp312-cp312-win_amd64.whl (297.0 kB view details)

Uploaded CPython 3.12Windows x86-64

px2csv-1.1.0-cp312-cp312-win32.whl (279.2 kB view details)

Uploaded CPython 3.12Windows x86

px2csv-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

px2csv-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

px2csv-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (102.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

px2csv-1.1.0-cp311-cp311-win_amd64.whl (296.1 kB view details)

Uploaded CPython 3.11Windows x86-64

px2csv-1.1.0-cp311-cp311-win32.whl (279.0 kB view details)

Uploaded CPython 3.11Windows x86

px2csv-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

px2csv-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

px2csv-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (102.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file px2csv-1.1.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 306.2 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 035163fdce1304466f392efab88a6f41e265195dfd2900dedd2d639965422c43
MD5 4bcd2b03007fbea4a02d1ffebde0dc72
BLAKE2b-256 d6e4302e98ca87dc06ac8b5fd43c86f1b36772aa88b15351aba6ea2ece0214d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp314-cp314-win32.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp314-cp314-win32.whl
  • Upload date:
  • Size: 286.9 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 011f1375059ebab86e224b45630fb9656f95e82b75c07447dc6300fd428a5f57
MD5 3fb4dc17bca53982ca78a6930b021292
BLAKE2b-256 b96ce77adcec92926ad4f107d70f8d000ae86476557ab4908e89b31d25fab4d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp314-cp314-win32.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 06e61ed2b3de2ded67b11085809342818359811c4a3d8df8be2a9c58036fc52f
MD5 9b0ec0465f59a56f057779998039f523
BLAKE2b-256 3d31800fe23249443eecf51986050d3dfa434654335209e03f12f7af9abf4aca

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp314-cp314-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73c605800853217342ff03d7c7dcf0c076b844e916afac14dac62fd6875c36b6
MD5 7e3aecceb7a607a027231aded64575bd
BLAKE2b-256 d66f25c9cd71fd14223d009b4dd9032d191136a8cadaa5ca20ff95275ee9c3db

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a807c91176123b2ad12ba92a3e3818f60f59f208a8ef53a08ec7643d6584848a
MD5 709d981acad7d12b1c177115bb03fad2
BLAKE2b-256 caf834482ecc8af49776c5846466e893b5cecd69b26d105d9402bdabaf5ede32

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 297.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e79a997cc190f8e9a983bd8d308b389a56fa5b27854fad37752a399b3d02f98c
MD5 632d9237ff361e26f3a65b44cf64400b
BLAKE2b-256 a971af751005553816b0bed5372c993d76f56ed323185478e2f7a067209a3a3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 279.2 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 7e8e627fcf8b2821d1ac9de175ce5f0b74641be18cc3dccd30cea1a724455f8b
MD5 e6853d6cacafb1f14a6947c454359281
BLAKE2b-256 29e8e734c30d9dfe147d07acb755f351016a8f60a6b810cef185495ef73fad76

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp313-cp313-win32.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d65517d655e2740641ae3e96244b08b40070e45768a22df970c1865c66f37b7f
MD5 9ba041420faf2ef1a26c9d60a3ddc8b3
BLAKE2b-256 19832f998f6ae7d589722338759c921cc4cb46ddaf366da1dd0efdee76f101a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b21170acdb90f45581072db5fa5b3cc1eed1f2036434e34ffa34f2a80d9a7d5b
MD5 ff7427c5188121733b007d027db6a69c
BLAKE2b-256 780161a762678b8b3b7356c8a174a9e612658fd605799528003809c79380b910

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a400126853fad2860ab26cdd1b0d35ebb1abe35e926f8a4d7ec96618e6759098
MD5 751c9d4810dac11e234e3b0a5fd924b6
BLAKE2b-256 9508e5ed0b5b273a9bd7406fe1e443572ab23755f538d1f985157ff0648835c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 297.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 df1ccc1418ec06c61f4c97f7289ac9df2d41182a0da99629a98cbe993e6ae905
MD5 abfcb3ea71ae7d7fcecd606ba70e86cb
BLAKE2b-256 4c628b033eafdd073e9115a91725825b183d9601814e5b76cf2b1f20135603ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 279.2 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 0ba33cbd1e3c5413e9f434440f195059fed6fd76ee52fadf42f1290df211bb52
MD5 4648a53f677680a9f44a77c16ecb754a
BLAKE2b-256 8d4f66fdedcaa3e79b701e9d5170528df5a276d577a771105b78b72ab0df6790

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp312-cp312-win32.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 27fd4c9a728952987dc8cfca1baf0a364fb5324d504a6719f205300ecba85945
MD5 e0f643a50df4f4b464b9c0e3cf906175
BLAKE2b-256 9aa97095f5fe46005810890be7dc547c3619fc31ab8e1ba0a901b9733322677a

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 985700a04a9f9b8e4d524b864cb9474563f8cb2402cb23a2897343702b32f4f7
MD5 793eabcb360de580024b2f3eeb13bcb8
BLAKE2b-256 e10ee524866c312062fc56fd8c0fd6f1b87c6b4a86fdc81a22a859f13504fb30

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db71bf34e039cf50f9d66a510abf972d668086d4f107852e1049a18f3ceec205
MD5 f22c25798aa6086a6f1319d0cf487356
BLAKE2b-256 6a4c40411c5c70b0134ed7ea9613ad4143c20cfc8c8adea92635bee6a400de1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 296.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f416e559fc7e4dd6faae8e3457727bd166ab39755e67a33e678b047fdae9834d
MD5 6e68f166c498aa09da57f86b08896979
BLAKE2b-256 f114abe9e6f3ed942adef601ab3759a0ef1b593d5657e443519e6afc5c160df2

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: px2csv-1.1.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 279.0 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for px2csv-1.1.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 35237d0936874b1cd8d03c5755ae1f9fffbd8071347c1b0572386024dbff78aa
MD5 6630ddb205ee338414c6316e79bd13ee
BLAKE2b-256 419bd21e1f72e77592049c36b9458e75f53f9ee68b8d9a2b3ccfc2c3a07c2bfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp311-cp311-win32.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7b82fe95dba2eacd393f7b37834f3aca657ba3a6836a83e82a9586aa70415433
MD5 6ad03d41e6ca8c332f2cf099ee078841
BLAKE2b-256 383b94ae6f809514b7b467a9e0dd7942f27532d39ece9e9ecf13c9c76e5fd7f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5c3848b6c128ac8d561be7bff1c840474232dff26ca78a102498166dac088bb
MD5 06602d3058c246ca0e41492330f71370
BLAKE2b-256 bfc19615605b2360172ac47ecdc79f63662b9128e8f86b532218b7bac1482c8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file px2csv-1.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for px2csv-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7dc4e3d478c862843b82e4ecfbe1f0f34a64e02bce354b376a06d85c8655f0ac
MD5 33b971eb22a7ef88ecf2964c08e9b489
BLAKE2b-256 65562d16acf06203552d842c28086d807f03cfa9176e4826024bc958edbcf92f

See more details on using hashes here.

Provenance

The following attestation bundles were made for px2csv-1.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on kustij/px2csv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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