@@ -0,0 +1,18 @@
+import pandas as pd
+
+def readXls(path):
+ # 读取xls文件
+ df = pd.read_excel(path)
+ # 将第一列数据按加号分隔
+ df.iloc[:, 0] = df.iloc[:, 0].astype(str).str.split('+')
+ # 将DataFrame数据转换为字典列表
+ data_list = df.to_dict('records')
+ return data_list
+if __name__ == '__main__':
+ print(readXls('kv.xls'))