Skip to main content

Python library to transform Data Structures

Project description

pytransformer

Transform complicated Python Data Structures

pytransformer is a library written in Python for transforming complicated Data structures in Python

Installation

To install the package, type the following -

pip install pytransformer

Functionalities Provided

- Transform List of List into Dict of List/Values

:param list_of_lists: The list of list which is to be converted to dictionary
:param key_index: takes the key whose value will be the key value to the converted dictionary
:param value_index:The key whose value will be used as resultant dict's value
:returns:transformed_dict

- Transform Dict of List/Values to List of List

:param input_dict: The dictionary which is to be converted into list of list
:returns:transformed dictionary

- Transform List of Dict to Dict of Dict

:param data: The data to be transformed
:param aggregate_key: The key whose value will be used as resultant dict's key
:param select_key: The key whose value will be used as resultant dict's value
:returns tranformed dictionary

- Transform Dict of Dict to List of Dict

:param input_dict: The dictionary which is to be converted into list of dictionary
:param select_key_name:the key whose value key of converted list of dictionary will be named
:returns:transformed list

- Merge Dictionaries

:param merge_func:the functin to be performed(like addition/substraction/multiplication) for the same key values in the Dictionaries
:param merge_type:Whether to perform union or intersection while merging Dictionaries
:returns:merged_dict

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

pytransformer-1.0.tar.gz (2.2 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