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.2.tar.gz
(2.5 kB
view hashes)
Built Distributions
pytranspose-0.0.2-py3.4.egg
(2.6 kB
view hashes)
Close
Hashes for pytranspose-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 253d9ddf23f5068cb6dde6d1b558400a5a4e3eee39522d60526be3935d1d8983 |
|
MD5 | 6f1a5385d72e39ff153f947738703844 |
|
BLAKE2b-256 | 15289e1f3b292320dceb8a61448528436b09003d82cc7bfb2151e70d027700cc |