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>`__.
=========
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytranspose-0.0.1.tar.gz
(2.5 kB
view hashes)
Built Distributions
pytranspose-0.0.1-py3.4.egg
(2.5 kB
view hashes)
Close
Hashes for pytranspose-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be7f0247e2bf74635f469c34e685459855d5b798fc50dc2dc54ca55be00a439b |
|
MD5 | 5becbdbd6b9e24851379a6dccb598e0b |
|
BLAKE2b-256 | a57375b64d6632ff50ad7c1384104785d9dc34b2cf538e6b86da330f90d321e4 |