python銀行資料分析之--民生銀行資料轉換
# 民生銀行資料轉換
def cmbcbankprocessdo(t, companyname, accountingtitle, begin):
t = t[4:]
# 倒序輸出
# t.reverse()
# 主體公司 會計科目
# companyname, accountingtitle, begin = input("輸入主體公司:"), input("輸入會計科目:"), input("輸入期初數:")
new_list =
n = 0
["序號", "交易id", "支出金額", "存入金額", "賬戶餘額", "承擔主體", "對方開戶行", "對方賬號", "對方戶名", "銀行摘要", "憑證號", "憑證摘要", "憑證鎖單狀態",
"交易時間",
"主鍵", "交易日期", "主體公司", "會計科目", "期末數", "期初數"])
for i in range(len(t)):
if not t[i][0]: continue
# tradedatetime = "{}-{}-{} {}:{}:{}".format(t[i][0][:4],t[i][0][4:6],t[i][0][6:],t[i][1][:2],t[i][1][2:4],t[i][1][4:])
tradedate = "{}-{}-{}".format(t[i][0][:4], t[i][0][4:6], t[i][0][6:])
tradedatestr = t[i][0]
row_list =
n = n + 1
# 支出金額
if t[i][1]:
else:
# 存入金額
if t[i][2]:
else:
# 賬戶餘額
if t[i][3]:
else:
# 對方戶名
if t[i][5]:
else:
# 主鍵 20200828
# 按第一順序 主鍵 第二順序 運單號 倒序排序
# new_list = sorted(new_list,key=(lambda x:[x[0],x[2]]),reverse=true)
return new_list
Python銀行資料分析之 工商銀行個人資料
python銀行資料分析之 工商銀行個人資料 工商銀行個人資料轉換 def icbcpersonalbankprocessdo t,companyname,accountingtitle,begin t t 7 倒序輸出 t.reverse 主體公司 會計科目 companyname,account...
python進行資料分析
python進行資料分析 1 import numpy as np arr np.random.randn 4,4 arr1 np.where arr 0,2,1 arr1.min arr1.max arr1.mean arr1.cumsum 0 arr1.cumsum 1 arr1.mean 0 ...
利用python進行資料分析
目錄 10 minutes to pandas 翻譯 pandas中loc iloc ix的區別 pandas dropna函式 pandas中dataframe的stack unstack 和pivot 方法的對比 pandas中關於set index和reset index的用法 python匿...