Skip to main content

Sparrow

Sparrow (a combination of Spark and arrow) is a Python mini library that enhances Spark with an arrow API.

Intent is to make mappers and filters over RDD a bit more elegant and exciting. Author also feels that here developed API does have a more consitent feel.

Consider and example of few operations on an RDD in native PySpark

...
rdd = spark.sparkContext.parallelize(
        [
            (1, 2.0, ["a", "b", "c"]),
            (2, 3.0, ["b", "c", "d"]),
            (3, 4.0, ["c", "d", "e"]),
            (4, 5.0, ["d", "e", "f"]),
            (5, 6.0, ["e", "f", "g"]),
        ]
    )
    
res = rdd.map(lambda x: x[2]).flatMap(lambda x: x).filter(lambda x: x == 'b')

and then on RDD extended with Sparrow:

rdd = spark.sparkContext.parallelize(
        [
            (1, 2.0, ["a", "b", "c"]),
            (2, 3.0, ["b", "c", "d"]),
            (3, 4.0, ["c", "d", "e"]),
            (4, 5.0, ["d", "e", "f"]),
            (5, 6.0, ["e", "f", "g"]),
        ]
    )

res = (
    SparrowRDD(rdd) 
    >> (lambda x: x[2]) 
    >> Flatten(lambda x: x)
    >> Filter(lambda x: x == 'b')
)

Release files for pysparrow 1.0.4

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

Source distribution (sdist)

Source distribution for pysparrow 1.0.4
File Size Uploaded
pysparrow-1.0.4.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysparrow 1.0.4
File Interpreter ABI Platform
pysparrow-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / pysparrow-1.0.4.tar.gz

Download URL pysparrow-1.0.4.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dadd4fe239c5b8007d2a5566b80b9255e779c0dfdbec5bd9d21d34574a9edf1e
BLAKE2b-256 checksum
How to use checksums
d261496021fd1291fdffe572c698858100a327eff8b9bb5a866fe9e885d2c85b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / pysparrow-1.0.4-py3-none-any.whl

Download URL pysparrow-1.0.4-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f7585a13190526ddaa19e81445cdc34269b458e67b6a9e4fc3f73c9ababc9ce
BLAKE2b-256 checksum
How to use checksums
882e994f001823c3aa3d319ea2b517efbeca48046457090fd32e72bec367f453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

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