excel - Python convert multiple content in a CSV file cell to multiple columns -
i new in using python. have number of csv files , read files , write them in single excel.
input: the csv files consists of number of columns , there grouping of content in specific cell
output expected: the output need break down specific cell , write in same column
the code writing is:
csv_folder = "file" book = xlwt.workbook() fil in os.listdir(csv_folder): sheet = book.add_sheet(fil[:-4]) open(csv_folder + fil) filname: reader = csv.reader(filname) = 0 row in reader: j, each in enumerate(row): sheet.write(i, j, each) += 1 book.save("output.xls")
it if provide example script.
Comments
Post a Comment