/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Public Attributes
Scraper::base::aggregate::PresentAggregate Class Reference

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 latt
 HARDCODED attname.
 funcs

Static Public Attributes

tuple ptn = re.compile("^(?P<att>\S*)_(?P<agf>\S*)$")

Detailed Description

Definition at line 37 of file aggregate.py.


Constructor & Destructor Documentation

def Scraper::base::aggregate::PresentAggregate::__init__ (   self,
  aggd 
)
Rearrange flat dict with key names att_agf 
into list-of-dict to facilitate tabular presentation 

Definition at line 39 of file aggregate.py.

00040                              :
00041         """
00042         Rearrange flat dict with key names att_agf 
00043         into list-of-dict to facilitate tabular presentation 
00044         """
00045         attd = {} 
00046         meta = {}
00047         agfs = set()
00048         for k,v in aggd.items():
00049             m = self.ptn.match(k)
00050             if m:
00051                 d = m.groupdict()
00052                 att, agf = d['att'], d['agf']
00053                 if not att in attd:
00054                     attd[att] = {}
00055                 attd[att][agf] = v
00056                 agfs.add(agf)
00057             else:
00058                 meta[k] = v  
00059 
00060         latt = "att [%s]" % meta['count']   ## HARDCODED attname
00061         self.latt = latt
00062         self.funcs = sorted(list(agfs))
00063 
00064         for att in sorted(attd):
00065             d = dict(attd[att])
00066             d.update( {latt:att} )
00067             self.append( d )


Member Function Documentation

def Scraper::base::aggregate::PresentAggregate::__str__ (   self)

Definition at line 68 of file aggregate.py.

00069                      :
00070          td = TabularData(self)
00071          return td.as_rst(cols=[self.latt] + self.funcs )
00072 


Member Data Documentation

tuple Scraper::base::aggregate::PresentAggregate::ptn = re.compile("^(?P<att>\S*)_(?P<agf>\S*)$") [static]

Definition at line 38 of file aggregate.py.

HARDCODED attname.

Definition at line 43 of file aggregate.py.

Definition at line 43 of file aggregate.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:03 for Scraper by doxygen 1.7.4