简体   繁体   中英

Extracting specific data from multiple text files to excel file using python

I have mutiple text files that contains data like file1 , file2 , file3 . Its just an example, I am wondering how to populate specific data in an Excel sheet like this excel sheet

I am new to learning python and the combination of text to excel through python that's why finding it hard to approch

Basically what you need is to Parse and write a new File in the csv File format for the use in excel

file1 -> PythonScript.py -> excel.csv

File Parser Python Tutorial Tutorial

The .csv File looks like this. You have a header and the data seperated with commas.

excel.csv:

Name,Data
hibiscus_3,54k
hibiscus_7,67k
Rose_3,87MB

Hope i could help you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM