0

Can anybody help with coding the below

I have multiple text files saved in a folder. In each text file, there are few reject codes written among other things. I need to copy a file's all the reject codes in a particular cell in excel.(seperated by a comma (,) ) Can anybody help on how to do the same with Python?

23rd Aug 2020, 9:20 PM
Tarun Thakur
Tarun Thakur - avatar
3 Respostas
+ 1
Try using OS and Pandas, sounds like a great use case for those 2 libraries. You can "walk" the directories and manipulate the files with Pandas
23rd Aug 2020, 9:25 PM
Steven M
Steven M - avatar
+ 1
csv ? python has csv module. but depend on the size Pandas may be better
23rd Aug 2020, 10:01 PM
Rei
Rei - avatar
0
Yeah, the Pandas CSV functions work on text files
23rd Aug 2020, 10:04 PM
Steven M
Steven M - avatar