Skip to main content

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
pytranspose-0.0.2-py2.py3-none-any.whl (4.0 kB) Copy SHA256 hash SHA256 Wheel 3.4
pytranspose-0.0.2-py3.4.egg (2.6 kB) Copy SHA256 hash SHA256 Egg 3.4
pytranspose-0.0.2.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page