Python银行数据分析之--农业银行数据转换
# 农业银行数据转换
def abcBankProcessDo(t, companyName, accountingTitle, begin):
t = t[3:]
# 倒序输出
t.reverse()
# 主体公司 会计科目
# companyName, accountingTitle, begin = input("输入主体公司:"), input("输入会计科目:"), input("输入期初数:")
new_list = []
n = 0
new_list.append(
["序号", "交易ID", "支出金额", "存入金额", "账户余额", "承担主体", "对方开户行", "对方账号", "对方户名", "银行摘要", "凭证号", "凭证摘要", "凭证锁单状态",
"交易时间",
"主键", "交易日期", "主体公司", "会计科目", "期末数", "期初数"])
for i in range(len(t)):
if not t[i][6]: continue
if not t[i][1]:
t[i][1] = "000000"
tradeDateTime = "{}-{}-{} {}:{}:{}".format(t[i][0][:4], t[i][0][4:6],