pandans read excel to list
读取excel 指定sheet 跳过首行
df = pd.read_excel("new.xlsx",sheet_name='字段说明', skiprows=1)
转成包含元组的列表
data_list = df.apply(lambda x: tuple(x), axis=1).values.tolist()
for data in data_list:
print(data)
直接成数组
for index, row in df.iterrows():
print(f"第{index}行数据:", list(row.items()))
break
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/18195308