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 details)
Built Distributions
pytranspose-0.0.2-py3.4.egg
(2.6 kB
view details)
File details
Details for the file pytranspose-0.0.2.tar.gz
.
File metadata
- Download URL: pytranspose-0.0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
540c366f57cb518d48fe1e852623aa82163df0c128b4431350bd273fd8b91f5e
|
|
MD5 |
85bb1ee7c58ebad7c38f25ae3ffa19f8
|
|
BLAKE2b-256 |
87e835d8687f061da61f721dafe6e7656efec83bc416b94d1b6a28b2141c82e1
|
File details
Details for the file pytranspose-0.0.2-py3.4.egg
.
File metadata
- Download URL: pytranspose-0.0.2-py3.4.egg
- Upload date:
- Size: 2.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cb1a6e4249a326a5facbe9fda0b135a662f6fef6b255d6e1df45cb8e17be9a82
|
|
MD5 |
7042c961dc52165b4707029c32b36691
|
|
BLAKE2b-256 |
03074e421d1e72250a783fcc602e2e52896139b1ea59772d3e03df0c8aab9e64
|
File details
Details for the file pytranspose-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pytranspose-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
253d9ddf23f5068cb6dde6d1b558400a5a4e3eee39522d60526be3935d1d8983
|
|
MD5 |
6f1a5385d72e39ff153f947738703844
|
|
BLAKE2b-256 |
15289e1f3b292320dceb8a61448528436b09003d82cc7bfb2151e70d027700cc
|