matminer package¶
Subpackages¶
Submodules¶
matminer.decorate module¶
matminer.pyCookieCheat module¶
matminer.utils module¶
-
matminer.utils.
flattenDict
(d, result=None)¶ Function to flatten a JSON dictionary. Taken from: https://gist.github.com/higarmi/6708779
example: The following JSON document: {“maps”:[{“id1”:”blabla”,”iscategorical1”:”0”, “perro”:[{“dog1”: “1”, “dog2”: “2”}]},{“id2”:”blabla”,”iscategorical2”:”0”}], “masks”:{“id”:”valore”}, “om_points”:”value”, “parameters”:{“id”:”valore”}}
will have the following output: {‘masks.id’: ‘valore’, ‘maps.iscategorical2’: ‘0’, ‘om_points’: ‘value’, ‘maps.iscategorical1’: ‘0’, ‘maps.id1’: ‘blabla’, ‘parameters.id’: ‘valore’, ‘maps.perro.dog2’: ‘2’, ‘maps.perro.dog1’: ‘1’, ‘maps.id2’: ‘blabla’}