[英]Python - Using csv and xlrd module to write multi-row excel file to one row csv file
[英]How to Write in csv or Excel file using CSV module or Pandas by combining two lists into one In Python?
您可以嘗試使用itertools
zip_longest
然后to_csv
import itertools
pd.DataFrame(itertools.zip_longest(list1,list2)).to_csv('Your.csv',header=None, index=None)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.