210 KiB
210 KiB
In [53]:
from login_for_cookie import Vc import requests import pandas as pd import re cookie = Vc() header = {"cookie":cookie} bank_flow_df = pd.read_clipboard()
In [ ]:
result = [] for idx,row in bank_flow_df.iterrows(): print(idx) url = "https://cp.maso.hk/index.php?main=store_trade_finance_management&navlist=finance_list&s_payment_serial_number=%s"% row["确认单号"] response = requests.get(url,headers=header) text = response.text dfs = pd.read_html(text) result.append(dfs[1])
In [ ]:
result
In [56]:
result[0] new_list = [] for df in result: for idx,row in df.iterrows(): currency_pattern = re.compile(r"EUR|USD|GBP|JPY|CNY|AUD|CAD|CHF|DKK|HKD|INR|KRW|MXN|NOK|NZD|RUB|SEK|SGD|THB|TRY|ZAR") id = row[0] currency = re.findall(currency_pattern,row[5]) if len(currency) == 0: continue amount = row[6] detail = row[7] temp_tuple = (currency[0],amount,detail,id) new_list.append(temp_tuple)
In [ ]:
new_list
In [58]:
import pandas as pd # 正数大概率没有可以处理的包裹 # 初始化结果列表 result_list = [] for i in new_list: try: id = i[3] currency = i[0] amount = float(i[1]) # 判断收入或支出 if amount > 0: type = 'income' else: type = 'expense' if i[2] == "--": detail = "--" else: text_split = i[2].split() text_split = text_split[3:] if len(text_split) > 3: if text_split[1] == "备用金": temp_dict = [{'支付手续费':text_split[0], '支付平台':text_split[1], '支付平台流水':text_split[2] +text_split[3] }] else: num = (len(text_split))//3 temp_dict = [] for j in range(num): temp_dict.append({'支付手续费':text_split[j*3], '支付平台':text_split[1+j*3], '支付平台流水':text_split[2+j*3] }) else : temp_dict = [{'支付手续费':text_split[0], '支付平台':text_split[1], '支付平台流水':text_split[2] if len(text_split) > 2 else "--"}] detail = temp_dict except Exception as e: print(e) # 计算累计总价(假设 total_price 是所有 amount 的累加) if isinstance(detail,list): commission = sum(float(item["支付手续费"]) for item in detail) else: commission = 0 # 将当前记录添加到结果列表 result_list.append([id,currency, amount, type, detail, commission]) # 最后一次性创建 DataFrame result_df = pd.DataFrame(result_list, columns=["id",'currency', 'amount', 'type', 'detail', 'commission']) result_df.to_clipboard()
In [59]:
nsum = 0 total_commission = 0 isum = 0 for idx,row in result_df.iterrows(): row # if i[2] =="--": # continue # if "SAIR" in str(i[2]): # print(i) # continue if row["currency"] == "CNY": rate = 1 real_rate = 1 if row["currency"] == "USD": rate = 7 real_rate = 7.16 if row["currency"] == "EUR": rate = 8 real_rate = 7.75 if row["currency"] == "GBP": rate = 9 real_rate = 9.1 if row["currency"] == "JPY": rate = 0.05 real_rate = 0.0485 if row["currency"] == "AUD": rate = 5 real_rate = 4.65 if row["currency"] == "CAD": rate = 5 real_rate = 5.2 if row["currency"] == "HKD": rate = 1 real_rate = 0.92 if row["amount"] > 0: nprice = row["amount"]*rate nsum += nprice if row["amount"] < 0: isum += row["amount"]*rate total_commission += row["commission"]*rate print(isum,nsum,total_commission)
-16659742.720000004 419510.17 3720.1500000000015
In [11]:
result_df
Out[11]:
| id | currency | amount | type | detail | commission | |
|---|---|---|---|---|---|---|
| 0 | 2539410 | CNY | -27.37 | expense | [{'支付手续费': '0.00', '支付平台': 'LLP', '支付平台流水': '2... | 0.00 |
| 1 | 2539409 | CNY | -292.11 | expense | [{'支付手续费': '0.00', '支付平台': 'LLP', '支付平台流水': '2... | 0.00 |
| 2 | 2539408 | CNY | -8085.36 | expense | [{'支付手续费': '0.00', '支付平台': 'LLP', '支付平台流水': '2... | 0.00 |
| 3 | 2539398 | USD | -1650.00 | expense | [{'支付手续费': '0.00', '支付平台': 'LLP', '支付平台流水': '2... | 0.00 |
| 4 | 2539397 | CNY | -5316.00 | expense | [{'支付手续费': '0.00', '支付平台': 'LLP', '支付平台流水': '2... | 0.00 |
| ... | ... | ... | ... | ... | ... | ... |
| 245 | 2541577 | USD | -41.50 | expense | [{'支付手续费': '0.00', '支付平台': 'Airwallex', '支付平台流... | 0.00 |
| 246 | 2541576 | USD | -307.49 | expense | [{'支付手续费': '0.01', '支付平台': 'Airwallex', '支付平台流... | 0.01 |
| 247 | 2541575 | USD | -2554.52 | expense | [{'支付手续费': '0.05', '支付平台': 'Airwallex', '支付平台流... | 0.05 |
| 248 | 2541563 | USD | 32.26 | income | [{'支付手续费': '0.00', '支付平台': 'Airwallex', '支付平台流... | 0.00 |
| 249 | 2541562 | USD | -50806.55 | expense | [{'支付手续费': '0.95', '支付平台': 'Airwallex', '支付平台流... | 0.95 |
250 rows × 6 columns
In [60]:
#反向处理,按照流水为主键用LIST的方式存储记录ID capital_flow_df = pd.DataFrame(columns=['流水号','平台','资金记录ID',"金额","手续费","币种"]) for idx,row in result_df.iterrows(): if isinstance(row["detail"],list)==False: continue for i in row["detail"]: temp_df = pd.DataFrame({'流水号':i['支付平台流水'],'平台':i['支付平台'],'资金记录ID':row['id'],"金额":row['amount'],"手续费":float(i['支付手续费']),"币种":row["currency"]},index=[0]) capital_flow_df = pd.concat([temp_df,capital_flow_df]) capital_flow_df_g = capital_flow_df.groupby(['流水号','平台',"币种"]).agg({'资金记录ID':list,'金额':sum,'手续费':sum}).reset_index() capital_flow_df_g.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\125592908.py:9: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
capital_flow_df = pd.concat([temp_df,capital_flow_df])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\125592908.py:10: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
capital_flow_df_g = capital_flow_df.groupby(['流水号','平台',"币种"]).agg({'资金记录ID':list,'金额':sum,'手续费':sum}).reset_index()
In [ ]:
tail_result = [] for idx,row in capital_flow_df_g.iterrows(): print(row["流水号"]) if row["流水号"] == "--": continue url = "https://cp.maso.hk/index.php?main=fin_settle_express&navlist=settle&s_payment_serial_number=%s"% row["流水号"] response = requests.get(url,headers=header) text = response.text dfs = pd.read_html(text) tail_result.append(dfs[1])
In [66]:
import re import pandas as pd def payment_handle(x): """ 处理支付信息字符串,提取支付明细和总额 示例输入: "支付平台 支付流水 支付金额 支付手续费 Airwallex 0087ca62 GBP2845.40 GBP0.52" """ if not x or len(x.split()) <= 4: # 处理空值或无效数据 return [], 0, 0 # 分割字符串并跳过前4个标题字段 parts = x.split()[4:] num_records = len(parts) // 4 # 计算完整记录数 records = [] total_amount = 0.0 total_commission = 0.0 for i in range(num_records): start_idx = i * 4 # 提取四个字段 platform = parts[start_idx] serial = parts[start_idx + 1] amount_str = parts[start_idx + 2] commission_str = parts[start_idx + 3] # 使用正则提取金额数字和币种 amount_match = re.search(r'([A-Z]+)?(\d+\.?\d*)', amount_str) commission_match = re.search(r'(\d+\.?\d*)', commission_str) # 解析金额数值 amount_val = float(amount_match.group(2)) if amount_match else 0.0 commission_val = float(commission_match.group(1)) if commission_match else 0.0 currency = amount_match.group(1) if amount_match else 'UNKNOWN' # 累加总额 total_amount += amount_val total_commission += commission_val # 构建记录 records.append({ '支付平台': platform, '支付流水': serial, '支付金额': amount_val, '支付手续费': commission_val, '币种': currency }) return records, total_amount, total_commission,currency # 示例用法 tail_df = pd.DataFrame(columns=['物流结算号','付款账户','确认时间',"支付时间","支付平台信息","支付总金额","支付总手续费","币种"]) for temp_df in tail_result: if len(temp_df) < 3 or temp_df[0][2] == "没有记录": # 跳过空DataFrame continue subtail_df = temp_df.iloc[2:].copy() # 跳过前三行标题 subtail_df[0] =subtail_df[0].str.extract(r'(\d+)').astype(float) # 应用处理函数 try: subtail_df[["支付平台信息","支付总金额","支付总手续费","币种"]] = subtail_df[19].apply( lambda x: pd.Series(payment_handle(x)) ) except: print("处理支付信息出错") print(subtail_df[19].apply( lambda x: pd.Series(payment_handle(x)) )) # 选择需要的列 result_df = subtail_df[[0,3,16,18,19,"支付平台信息","支付总金额","支付总手续费","币种"]] result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True) tail_df = pd.concat([tail_df, result_df], axis=0) tail_df = tail_df.drop_duplicates(subset=["物流结算号"],keep="last") tail_df.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:75: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
tail_df = pd.concat([tail_df, result_df], axis=0)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1371936810.py:74: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",16:"确认时间",18:"支付时间"},inplace=True)
In [67]:
tail_flow_df = pd.DataFrame(columns=['流水号','平台',"金额","手续费","币种"]) for idx, row in tail_df.iterrows(): if isinstance(row["支付平台信息"],list)==False: continue for i in row["支付平台信息"]: temp_df = pd.DataFrame({'流水号':i['支付流水'],'平台':i['支付平台'],"金额":i['支付金额'],"手续费":float(i['支付手续费']),"币种":i["币种"]},index=[0]) tail_flow_df = pd.concat([temp_df,tail_flow_df]) tail_flow_df_g = tail_flow_df.groupby(['流水号','平台',"币种"]).agg({'金额':sum,'手续费':sum}).reset_index()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\3213097610.py:7: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
tail_flow_df = pd.concat([temp_df,tail_flow_df])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\3213097610.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
tail_flow_df_g = tail_flow_df.groupby(['流水号','平台',"币种"]).agg({'金额':sum,'手续费':sum}).reset_index()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\3213097610.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
tail_flow_df_g = tail_flow_df.groupby(['流水号','平台',"币种"]).agg({'金额':sum,'手续费':sum}).reset_index()
In [68]:
tail_flow_df_g.to_clipboard()
In [69]:
head_result = [] for idx,row in capital_flow_df_g.iterrows(): if row["流水号"] == "--": continue url = "https://cp.maso.hk/index.php?main=bol&navlist=finance_record_settle&s_payment_serial_number=%s"% row["流水号"] response = requests.get(url,headers=header) text = response.text dfs = pd.read_html(text) head_result.append(dfs[2])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\4018039065.py:9: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text)
In [71]:
def payment_handle(x): """ 处理支付信息字符串,提取支付明细和总额 示例输入: "支付平台 支付流水 支付金额 支付手续费 Airwallex 0087ca62 GBP2845.40 GBP0.52" """ if not x or len(x.split()) <= 4: # 处理空值或无效数据 return [], 0, 0 # 分割字符串并跳过前4个标题字段 parts = x.split()[4:] num_records = len(parts) // 4 # 计算完整记录数 records = [] total_amount = 0.0 total_commission = 0.0 for i in range(num_records): start_idx = i * 4 # 提取四个字段 platform = parts[start_idx] serial = parts[start_idx + 1] amount_str = parts[start_idx + 2] commission_str = parts[start_idx + 3] # 使用正则提取金额数字和币种 amount_match = re.search(r'([A-Z]+)?(\d+\.?\d*)', amount_str) commission_match = re.search(r'(\d+\.?\d*)', commission_str) # 解析金额数值 amount_val = float(amount_match.group(2)) if amount_match else 0.0 commission_val = float(commission_match.group(1)) if commission_match else 0.0 currency = amount_match.group(1) if amount_match else 'UNKNOWN' # 累加总额 total_amount += amount_val total_commission += commission_val # 构建记录 records.append({ '支付平台': platform, '支付流水': serial, '支付金额': amount_val, '支付手续费': commission_val, '币种': currency }) return records, total_amount, total_commission,currency # 示例用法 head_df = pd.DataFrame(columns=['结算号','付款账户','结算时间',"确认结算时间","支付平台信息","支付总金额","支付总手续费","币种"]) for temp_df in head_result: if len(temp_df) < 2 or temp_df[1][1] == "无记录": # 跳过空DataFrame continue subtail_df = temp_df.iloc[1:].copy() # 跳过前三行标题 subtail_df[0] =subtail_df[0].str.extract(r'(\d+)').astype(float) # 应用处理函数 try: subtail_df[["支付平台信息","支付总金额","支付总手续费","币种"]] = subtail_df[17].apply( lambda x: pd.Series(payment_handle(x)) ) except: print("处理支付信息出错") print(subtail_df[17].apply( lambda x: pd.Series(payment_handle(x)) )) # 选择需要的列 result_df = subtail_df[[0,3,5,12,17,"支付平台信息","支付总金额","支付总手续费","币种"]] result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True) head_df = pd.concat([head_df, result_df], axis=0) head_df = head_df.drop_duplicates(subset=["物流结算号"],keep="last") head_df.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:72: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
head_df = pd.concat([head_df, result_df], axis=0)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\975717243.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",4:"付款账户",5:"结算时间",12:"确认结算时间"},inplace=True)
In [73]:
head_flow_df = pd.DataFrame(columns=['流水号','平台',"金额","手续费"]) for idx, row in head_df.iterrows(): if isinstance(row["支付平台信息"],list)==False: continue for i in row["支付平台信息"]: temp_df = pd.DataFrame({'流水号':i['支付流水'],'平台':i['支付平台'],"金额":i['支付金额'],"手续费":float(i['支付手续费']),"币种":i['币种']},index=[0]) head_flow_df = pd.concat([temp_df,head_flow_df]) head_flow_df_g = head_flow_df.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index() head_flow_df_g.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1693534846.py:7: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
head_flow_df = pd.concat([temp_df,head_flow_df])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1693534846.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
head_flow_df_g = head_flow_df.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1693534846.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
head_flow_df_g = head_flow_df.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index()
In [74]:
expend_result = [] for idx,row in capital_flow_df_g.iterrows(): if row["流水号"] == "--": continue url = "https://cp.maso.hk/index.php?main=odr_cost&navlist=expend_batch&s_payment_serial_number=%s"% row["流水号"] response = requests.get(url,headers=header) text = response.text dfs = pd.read_html(text) expend_result.append(dfs[1])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text) C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1641200776.py:8: FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object. dfs = pd.read_html(text)
In [75]:
def payment_handle(x): """ 处理支付信息字符串,提取支付明细和总额 示例输入: "支付平台 支付流水 支付金额 支付手续费 Airwallex 0087ca62 GBP2845.40 GBP0.52" """ if not x or len(x.split()) <= 4: # 处理空值或无效数据 return [], 0, 0 # 分割字符串并跳过前4个标题字段 parts = x.split()[4:] num_records = len(parts) // 4 # 计算完整记录数 records = [] total_amount = 0.0 total_commission = 0.0 for i in range(num_records): start_idx = i * 4 # 提取四个字段 platform = parts[start_idx] serial = parts[start_idx + 1] amount_str = parts[start_idx + 2] commission_str = parts[start_idx + 3] # 使用正则提取金额数字和币种 amount_match = re.search(r'([A-Z]+)?(\d+\.?\d*)', amount_str) commission_match = re.search(r'(\d+\.?\d*)', commission_str) # 解析金额数值 amount_val = float(amount_match.group(2)) if amount_match else 0.0 commission_val = float(commission_match.group(1)) if commission_match else 0.0 currency = amount_match.group(1) if amount_match else 'UNKNOWN' # 累加总额 total_amount += amount_val total_commission += commission_val # 构建记录 records.append({ '支付平台': platform, '支付流水': serial, '支付金额': amount_val, '支付手续费': commission_val, '币种': currency }) return records, total_amount, total_commission,currency # 示例用法 expend_df = pd.DataFrame(columns=['结算号','付款账户','结算时间',"确认结算时间","支付平台信息","支付总金额","支付总手续费","币种"]) for temp_df in expend_result: if len(temp_df) < 2 or temp_df[1][1] == "无记录": # 跳过空DataFrame continue subtail_df = temp_df.iloc[1:].copy() # 跳过前三行标题 subtail_df[0] =subtail_df[0].str.extract(r'(\d+)').astype(float) # 应用处理函数 try: subtail_df[["支付平台信息","支付总金额","支付总手续费","币种"]] = subtail_df[13].apply( lambda x: pd.Series(payment_handle(x)) ) except: print("处理支付信息出错") print(subtail_df[17].apply( lambda x: pd.Series(payment_handle(x)) )) # 选择需要的列 result_df = subtail_df[[0,3,4,7,17,"支付平台信息","支付总金额","支付总手续费","币种"]] result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True) expend_df = pd.concat([expend_df, result_df], axis=0) expend_df = expend_df.drop_duplicates(subset=["物流结算号"],keep="last") expend_df.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:72: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
expend_df = pd.concat([expend_df, result_df], axis=0)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\1571627553.py:71: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result_df.rename(columns={0:"物流结算号",3:"付款账户",4:"支付金额",7:"添加时间"},inplace=True)
In [77]:
expend_df_flow = pd.DataFrame(columns=['流水号','平台',"金额","手续费"]) for idx, row in expend_df.iterrows(): if isinstance(row["支付平台信息"],list)==False: continue for i in row["支付平台信息"]: temp_df = pd.DataFrame({'流水号':i['支付流水'],'平台':i['支付平台'],"金额":i['支付金额'],"手续费":float(i['支付手续费']),"币种":i['币种']},index=[0]) expend_df_flow = pd.concat([temp_df,expend_df_flow]) expend_df_flow_g = expend_df_flow.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index() expend_df_flow_g.to_clipboard()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\2501565041.py:7: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
expend_df_flow = pd.concat([temp_df,expend_df_flow])
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\2501565041.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
expend_df_flow_g = expend_df_flow.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index()
C:\Users\joker\AppData\Local\Temp\ipykernel_46936\2501565041.py:8: FutureWarning: The provided callable <built-in function sum> is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "sum" instead.
expend_df_flow_g = expend_df_flow.groupby(['流水号','平台','币种']).agg({'金额':sum,'手续费':sum}).reset_index()
In [ ]: