李婧Amy的博客def main():fh = open('lines.txt')for line in fh.readlines():print(line)if __name__ == "__main__": main()Directory filesI am on for-working.py file, and am trying to access the lines.txt file within th...
weixin_39914732的博客python 怎么样将得到的结果储存在一个excel中的不同列import pandas as pda=[0,0]b=[1,2]c=[0.518476,0.486959]df=pd.DataFrame(list(zip(a,b,c)),columns=['name','1999','2000'])df.to_excel('d:/sss.xlsx',index=...
downmoon的博客 for row in xlsx_ws.iter_cols(min_row=1,max_row=1): labels+=([cell.value for cell in row]) # extract the data and store in a list # each element is a row from the Excel file data = [] for row in xlsx_...