Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

transpose nested dict and list.

Project description


Transpose nested dict and list.


.. 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)


These codes are licensed under
`CC0 <>`__.

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

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page