Skip to main content

Pairwise explode columns in a pandas DataFrame

# Tested with:
# Python 3.9.13
# Windows 10

pip install a-pandas-ex-pairwise-explode



from a_pandas_ex_pairwise_explode import pd_add_pairwise_explode
import pandas as pd
pd_add_pairwise_explode()
df = pd.DataFrame(
    [
        ((244, 22, 12), (1, 3, 4), "a"),
        ((2424, 221), (1, 3), "b"),
        ((26544, 22, 12, "1"), (1, 3, 4, "dd"), "c"),
        ((244, 22, 12), (1, 3, 4), "d"),
    ]
)
"""
                    0              1  2
0       (244, 22, 12)      (1, 3, 4)  a
1         (2424, 221)         (1, 3)  b
2  (26544, 22, 12, 1)  (1, 3, 4, dd)  c
3       (244, 22, 12)      (1, 3, 4)  d

"""

dfnew = df.d_pairwise_explode(columns=[0, 1])
"""
       0   1  2
0    244   1  a
0     22   3  a
0     12   4  a
1   2424   1  b
1    221   3  b
2  26544   1  c
2     22   3  c
2     12   4  c
2      1  dd  c
3    244   1  d
3     22   3  d
3     12   4  d
"""

Metadata

Release files for a-pandas-ex-pairwise-explode 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for a-pandas-ex-pairwise-explode 0.10
File Size Uploaded Provenance Actions
a_pandas_ex_pairwise_explode-0.10.tar.gz 3.5 kB Without provenance Details for a_pandas_ex_pairwise_explode-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for a-pandas-ex-pairwise-explode 0.10
File Interpreter ABI Platform Actions
a_pandas_ex_pairwise_explode-0.10-py3-none-any.whl Python 3 none any Details for a_pandas_ex_pairwise_explode-0.10-py3-none-any.whl

Total release size: 8.6 kB

Release files / a_pandas_ex_pairwise_explode-0.10.tar.gz

Download URL a_pandas_ex_pairwise_explode-0.10.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7c21b2101ad875b70ddf53fba5afd4c6084f35614ce8582f7880a337e4b3c090
BLAKE2b-256 checksum
How to use checksums
63f72f7da9e9d1ef7266d06301d9af65434eefdb837de10086b4d2064b11a3f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / a_pandas_ex_pairwise_explode-0.10-py3-none-any.whl

Download URL a_pandas_ex_pairwise_explode-0.10-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3051ad43c181eb65f4621f28e0883ca91ac1086256c668626e6d5168047b4fe8
BLAKE2b-256 checksum
How to use checksums
a0471f4ee059a4fc8c1f7a3783343a361562a7f771837e3802ca247ed72b1efc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for a-pandas-ex-pairwise-explode 0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page