def __init__(self,spec,dataset,options=Options(),*args,**kwargs): # logger.setLevel(logging.DEBUG) Processor.__init__(self,spec,options) self._dataset = dataset if len(args)>0: self._start = int(args[0]) else: from datetime import date self._start = date.today().year-1 logger.debug('start=%s len(args)=%d',self._start,len(args)) logger.debug('spec=%s',spec) self._year = spec.get('YEAR') self._document = spec.get('DOCUMENT') self._table = spec.get('TABLE','tab2a') self._url = "http://www.imf.org/external/np/tre/activity/%s/%s.htm#%s"%(self._year,self._document,self._table)
def __init__(self, spec, dataset, options=Options(), *args,**kwargs): Processor.__init__(self,spec,options) self._dataset = dataset if len(args)>0: self._start = int(args[0]) else: from datetime import date self._start = date.today().year-1 self._methods = [ 'ADELTAP', 'AVG', 'BPASS', 'CONVERT', 'DECUMULATE', 'DELTAP', 'DROP', 'FFILL', 'LIMIT', 'LIMITY', 'MAVE', 'MAX', 'MEAN', 'NOP', 'OPER', 'QUAD', 'REBASE', 'SET', 'SHIFT', 'TURNINGP', 'WEIGHTED_AVG', 'ZEROMISSING', ]
def __init__(self, spec, dataset, options=Options(), *args,**kwargs): logger.debug('BASIC PROCESSOR BEGINS') Processor.__init__(self,spec,options,dataset)