midict.readthedocs.io - MIDict (Multi-Index Dict) — MIDict 0.1 documentation

Example domain paragraphs

MIDict is an ordered “dictionary” with multiple indices where any index can serve as “keys” or “values”, capable of assessing multiple values via its powerful indexing syntax, and suitable as a bidirectional/inverse dict (a drop-in replacement for dict/OrderedDict in Python 2 & 3).

The above table-like data set (with multiple columns/indices) can be represented using a MIDict :

user = MIDict ([[ 'jack' , 1 , '192.1' ], # list of items (rows of data) [ 'tony' , 2 , '192.2' ]], [ 'name' , 'uid' , 'ip' ]) # a list of index names Access a key and get a value or a list of values (similar to a normal dict ):