Skip to main content

transpose nested dict and list.

Project description

pytranspose
=========

Transpose nested dict and list.

Usage
-----

.. code:: python

from pytranspose import transpose
# assume you have time serise data of temperature in variouse city.
#
# a[city][time] -> temperature
#
# now you want to compare temperature in different city at the same time point.
# transpose function meets this requirement.
#
# b = transpose(a, [1, 0])
# b[time][city] -> temperature
# print(a["Tokyo"][2]) -> 28
a = {"Tokyo": [27, 28, 29], "New York": [25, 24, 28]}
# print(b[1]["New York"]) -> 24
b = transpose(a)

License
-------

These codes are licensed under
`CC0 <https://creativecommons.org/publicdomain/zero/1.0/deed>`__.

Project details


Download files

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

Files for pytranspose, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pytranspose-0.0.2-py2.py3-none-any.whl (4.0 kB) File type Wheel Python version 3.4 Upload date Hashes View
Filename, size pytranspose-0.0.2-py3.4.egg (2.6 kB) File type Egg Python version 3.4 Upload date Hashes View
Filename, size pytranspose-0.0.2.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page