def _guess_type(field):
 data_types = set([int, float])
 if isinstance(field, (dict, list)):
  return 'nested'
 if isinstance(field, int):
  return 'int'
 if isinstance(field, float):
  return 'float'
 for data_type in list(data_types):
  try:
   data_type(field)
  except (TypeError, ValueError):
   data_types.discard(data_type)
   if (not data_types):
    break
 if (int in data_types):
  return 'integer'
 elif (float in data_types):
  return 'numeric'
 for format in _DATE_FORMATS:
  try:
   datetime.datetime.strptime(field, format)
   return 'timestamp'
  except (ValueError, TypeError):
   continue
 return 'text'

def _guess_type ( field ) : data_types = set ( [ int , float ] ) if isinstance ( field , ( dict , list ) ) : return 'nested' if isinstance ( field , int ) : return 'int' if isinstance ( field , float ) : return 'float' for data_type in list ( data_types ) : try : data_type ( field ) except ( TypeError , ValueError ) : data_types . discard ( data_type ) if ( not data_types ) : break if ( int in data_types ) : return 'integer' elif ( float in data_types ) : return 'numeric' for format in _DATE_FORMATS : try : datetime . datetime . strptime ( field , format ) return 'timestamp' except ( ValueError , TypeError ) : continue return 'text'
simple guess type of field .