Python Forum
Separate text files and convert into csv
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Separate text files and convert into csv
#7
Thank you all for your comments and time. In my case it works well
output.writerow([(txt_file), line.replace ('\n', ' ')])
as suggested by BashBedlam.
I also decided to remove punctuation in my text files to not have the problems referred by supuflounder.
Thank you!
Reply


Messages In This Thread
RE: Separate text files and convert into csv - by marfer - Dec-10-2021, 12:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python convert multiple files to multiple lists MCL169 6 1,749 Nov-25-2023, 05:31 AM
Last Post: Iqratech
  Split Bytearray into separate Files by Hex delimter lastyle 5 3,087 Mar-09-2023, 07:49 AM
Last Post: bowlofred
  azure TTS from text files to mp3s mutantGOD 2 1,846 Jan-17-2023, 03:20 AM
Last Post: mutantGOD
  Writing into 2 text files from the same function paul18fr 4 1,802 Jul-28-2022, 04:34 AM
Last Post: ndc85430
  Delete empty text files [SOLVED] AlphaInc 5 1,685 Jul-09-2022, 02:15 PM
Last Post: DeaD_EyE
  select files such as text file RolanRoll 2 1,291 Jun-25-2022, 08:07 PM
Last Post: RolanRoll
  Two text files, want to add a column value zxcv101 8 2,096 Jun-20-2022, 03:06 PM
Last Post: deanhystad
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,492 May-17-2022, 07:49 AM
Last Post: Pedroski55
  select Eof extension files based on text list of filenames with if condition RolanRoll 1 1,615 Apr-04-2022, 09:29 PM
Last Post: Larz60+
  How to save files in a separate directory Scordomaniac 3 2,435 Mar-16-2022, 10:17 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020