Pandas逐行读取Dateframe并转为list

    for indexs in df.index:
        rowData = df.loc[indexs].values[0:7]
        rowData = rowData.tolist()
        #print(rowData)
        sheet1.append(rowData) #逐行写入excel的sheet1

 

posted @ 2019-04-03 13:56  武功震树  阅读(5159)  评论(0编辑  收藏  举报