Skip to main content

fntools

https://readthedocs.org/projects/fntools/badge/?version=master
target:

https://readthedocs.org/projects/fntools/?badge=master

alt:

Documentation Status

fntools provides functional programming tools for data processing. This module is a set of functions that I needed in my work and found useful.

Installation

pip install fntools

Examples

  • Split a list of elements with factors with split:

    songs = ('Black', 'Even Flow', 'Amongst the waves', 'Sirens')
    albums = ('Ten', 'Ten', 'Backspacer', 'Lightning Bolt')
    print split(songs, albums)
    {'Lightning Bolt': ['Sirens'], 'Ten': ['Black', 'Even Flow'], 'Backspacer': ['Amongst the waves']}
  • Determine whether any element of a list is included in another list with any_in:

    print any_in(['Oceans', 'Big Wave'], ['Once', 'Alive', 'Oceans', 'Release'])
    True
    
    print any_in(['Better Man'], ['Man of the Hour', 'Thumbing my way'])
    False
  • Apply many functions on the data with dispatch:

    # Suppose we want to know the mean, the standard deviation and the median of
    # a distribution (here we use the standard normal distribution)
    
    import numpy as np
    np.random.seed(10)
    x = np.random.randn(10000)
    
    print dispatch(x, (np.mean, np.std, np.median))
    [0.0051020560019149385, 0.98966401277169491, 0.013111308495186252]

Many more useful functions are available. For more details, go to the documentation.

Inspirations

Metadata

Release files for fntools 1.1.2

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

Source distribution (sdist)

Source distribution for fntools 1.1.2
File Size Uploaded Provenance Actions
fntools-1.1.2.tar.gz 8.8 kB Without provenance Details for fntools-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fntools 1.1.2
File Interpreter ABI Platform Actions
fntools-1.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for fntools-1.1.2-py2.py3-none-any.whl

Total release size: 19.8 kB

Release files / fntools-1.1.2.tar.gz

Download URL fntools-1.1.2.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3e5a141d51501a0c9bb1887ece77a5393ec0263c012724612f4afc5b0e50163c
BLAKE2b-256 checksum
How to use checksums
61a1c398a709b978cf64030bbbf640d098589376ffa8d976ad77eb01b3cb102c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fntools-1.1.2-py2.py3-none-any.whl

Download URL fntools-1.1.2-py2.py3-none-any.whl
Size 11.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
54af8aee9a1b832ff2d529f4179e02e41996b1136b27757debde64ba804d6182
BLAKE2b-256 checksum
How to use checksums
44e51c9c660f2a620502487b9a9377cc157f77576ac9cb95f82179faa3a559af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fntools 1.1.2

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.

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