- 帖子
- 4
- 精华
- 0
- 积分
- 15
- 阅读权限
- 10
- 注册时间
- 2018-3-10
- 最后登录
- 2018-3-11
|
- for row in range(7,ws.max_row+1):
- name = ws[name_col + str(row)].value.strip().strip('#')#去掉#和空格
- ID = ws[ID_col + str(row)].value.replace("\n","").strip().strip('\n')
- account = ws[account_col + str(row)].value
- address = ws[address_col + str(row)].value.strip()
- #如果新名称不在已有的名称集里,那么将其加入集(姓名+身份证号码去重)
- if name + ID not in all_name_ID:
- all_name_ID.append(name + ID)
- if name in []:
- belong = ''
- elif name in [']:
- belong = ''
- elif name in []:
- belong = ''
- elif name in [']:
- belong = ''
- else:
- belong = ''
- if len(name) <= 5:
- category = '自然人'
- short_name = name
- elif '信托' in name:
- category = '信托'
- short_name = name.split('-')[0:][:1]
- elif '保险' in name:
- category = '保险'
- short_name = name.split('-')[0:][:1]
- elif ('证券股份有限公司' in name) or ('证券有限责任公司' in name):
- category = '券商'
- short_name = name[0:5]
复制代码 为什么借口错误的,语法什么的应该都没有问题的,问题出在自然人和信托那里,想了好久不知道怎么改,哪位大神能够伸出援手,感激不尽!!!! |
|