Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Functional programming tools for data processing

Project Description
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.


pip install fntools


  • 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'])
    print any_in(['Better Man'], ['Man of the Hour', 'Thumbing my way'])
  • 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
    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.


Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
fntools-1.1.2-py2.py3-none-any.whl (11.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Mar 4, 2016
fntools-1.1.2.tar.gz (8.8 kB) Copy SHA256 Checksum SHA256 Source Mar 4, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting