merge_machine/preprocess_fields_v3.py
def likeliest_types(self, h, f, singleType = False):
		''' Returns None rather than an empty list to signify that not a single type has been inferred.

			Parameters:
			h the field header
			f the field itself
			singleType if True, then a unique choice per column will be made '''
		lht = h.likeliest_type()
		logging.info('Likeliest type for %s header: %s', h.value, lht)
		lvts = [lht] if lht is not None else None
		if singleType:
			lvt = f.likeliest_type()
			if lvt is not None:
				logging.info('Likeliest type for %s values: %s', h.value, lvt)
				lvts = [lvt]
		else:
			lvt = f.likeliest_types()
			if len(lvt) > 0:
				logging.info('Likeliest types for %s values: %s', h.value, ', '.join(lvt))
				lvts = lvt
		if lvts is None:
			logging.info('Could not infer type for %s values: %s', h.value, ', '.join(lvt))
		return lvts
 Returns None rather than an empty list to signify that not a single type has been inferred.

			Parameters:
			h the field header
			f the field itself
			singleType if True, then a unique choice per column will be made 
Returns None rather than an empty list to signify that not a single type has been inferred.
Parameters:
h the field header
f the field itself
singleType if True, then a unique choice per column will be made
Returns None rather than an empty list to signify that not a single type has been inferred . Parameters : h the field header f the field itself singleType if True then a unique choice per column will be made
def likeliest_types(self, h, f, singleType = False):
		lht = h.likeliest_type()
		logging.info('Likeliest type for %s header: %s', h.value, lht)
		lvts = [lht] if lht is not None else None
		if singleType:
			lvt = f.likeliest_type()
			if lvt is not None:
				logging.info('Likeliest type for %s values: %s', h.value, lvt)
				lvts = [lvt]
		else:
			lvt = f.likeliest_types()
			if len(lvt) > 0:
				logging.info('Likeliest types for %s values: %s', h.value, ', '.join(lvt))
				lvts = lvt
		if lvts is None:
			logging.info('Could not infer type for %s values: %s', h.value, ', '.join(lvt))
		return lvts
def likeliest_types ( self , h , f , singleType = False ) : lht = h . likeliest_type ( ) logging . info ( 'Likeliest type for %s header: %s' , h . value , lht ) lvts = [ lht ] if lht is not None else None if singleType : lvt = f . likeliest_type ( ) if lvt is not None : logging . info ( 'Likeliest type for %s values: %s' , h . value , lvt ) lvts = [ lvt ] else : lvt = f . likeliest_types ( ) if len ( lvt ) > 0 : logging . info ( 'Likeliest types for %s values: %s' , h . value , ', ' . join ( lvt ) ) lvts = lvt if lvts is None : logging . info ( 'Could not infer type for %s values: %s' , h . value , ', ' . join ( lvt ) ) return lvts
Returns None rather than an empty list to signify that not a single type has been inferred.
Returns None rather than an empty list to signify that not a single type has been inferred .
''' Returns None rather than an empty list to signify that not a single type has been inferred.

			Parameters:
			h the field header
			f the field itself
			singleType if True, then a unique choice per column will be made '''
self
h
f
singleType