class_docstr: Wrapper class around dict to get pretty prints
  
  :class:`Data` is an ordered dictionary that implements a dedicated
  pretty print method for a nested dictionary. Printing a :class:`Data`
  dictionary provides a human-readable table. The input dictionary is
  expected to have two levels: the first level gives the columns and the
  second level the rows. Rows names are parsed as
  ``[OUTER]/[MIDDLE].[INNER]--[IDX]``, where IDX has to be an integer. All
  entries are optional.
  
  .. seealso::
      :func:`assemble_data`, :func:`assemble_table`
  
  Warning
  -------
  :class:`Data` is an internal class that expects a particular functions.
  This class cannot be used as a general drop-in replacement for the standard
  ``dict`` class.
  
  Examples
  --------
  >>> from mlens.metrics import Data
  >>> d = [('row-idx-1.row-idx-2.0.0', {'column-1': 0.1, 'column-2': 0.1})]
  >>> data = Data(d)
  >>> print(data)
                          column-a  column-b
  row-idx-1  row-idx-2        0.10      0.20
class_docstr_tok: ["Wrapper","class","around","dict","to","get","pretty","prints",":","class",":","`","Data","`","is","an","ordered","dictionary","that","implements","a","dedicated","pretty","print","method","for","a","nested","dictionary",".","Printing","a",":","class",":","`","Data","`","dictionary","provides","a","human-readable","table",".","The","input","dictionary","is","expected","to","have","two","levels",":","the","first","level","gives","the","columns","and","the","second","level","the","rows",".","Rows","names","are","parsed","as","``","[","OUTER","]","\/","[","MIDDLE","]",".","[","INNER","]","--","[","IDX","]","``",",","where","IDX","has","to","be","an","integer",".","All","entries","are","optional",".","..","seealso",":",":",":","func",":","`","assemble_data","`",",",":","func",":","`","assemble_table","`","Warning","--","--","--","-",":","class",":","`","Data","`","is","an","internal","class","that","expects","a","particular","functions",".","This","class","can","not","be","used","as","a","general","drop-in","replacement","for","the","standard","``","dict","``","class",".","Examples","--","--","--","--",">",">",">","from","mlens.metrics","import","Data",">",">",">","d","=","[","(","'row-idx-1.row-idx-2.0.0","'",",","{","'column-1","'",":","0.1",",","'column-2","'",":","0.1","}",")","]",">",">",">","data","=","Data","(","d",")",">",">",">","print","(","data",")","column-a","column-b","row-idx-1","row-idx-2","0.10","0.20"]
code: def __init__(self, data=None, padding=2, decimals=2):
      if isinstance(data, list):
          data = assemble_data(data)
      super(Data, self).__init__(data)
      self.__padding__ = padding
      self.__decimals__ = decimals
  
file_path: mlens/mlens/metrics/utils.py
imports: from __future__ import division
  import warnings
  import numpy
  from ..utils.exceptions import MetricWarning
label_desc: Use image node_id 1 to create a new Data object from inherited base classes: _dict with example: obj = Data(data, padding, decimals)