Skip to main content

Simple function to parallelize the mapping function of Pandas DataFrame

Project description

Build Status Coverage Status

pd_multiprocessing

pd_multiprocessing provides a simple, parallelized function to apply a user defined function rowwise on a Pandas Dataframe.

Usage

A typical usage looks like this

import pandas as pd
from pd_multiprocessing.map import df_map


def twotimes(row):
    row['col2'] = row['col1']*2
    return row


if __name__ == '__main__':
    df = pd.DataFrame.from_dict({'col1': range(100)})
    print(df_map(twotimes, df))

Project details


Download files

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

Source Distribution

pd_multiprocessing-1.0.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page