Convert multiple .txt files into single .csv file (python)
问题 I need to convert a folder with around 4,000 .txt files into a single .csv with two columns: (1) Column 1: 'File Name' (as specified in the original folder); (2) Column 2: 'Content' (which should contain all text present in the corresponding .txt file). Here you can see some of the files I am working with. The most similar question to mine here is this one (Combine a folder of text files into a CSV with each content in a cell) but I could not implement any of the solutions presented there.