Python Forum
Why there's a 'blank line' on CSV file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why there's a 'blank line' on CSV file?
#5
You are on Windows, open the out file with newline=''. It is in the docs. See also https://stackoverflow.com/a/3348664/4046632
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Why there's a 'blank line' on CSV file? - by buran - Mar-25-2021, 03:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  File "<string>", line 19, in <module> error is related to what? Frankduc 9 12,545 Mar-09-2023, 07:22 AM
Last Post: LocklearSusan
  Getting last line of each line occurrence in a file tester_V 1 860 Jan-31-2023, 09:29 PM
Last Post: deanhystad
  python insert blank line in logger mg24 1 2,828 Nov-02-2022, 08:36 AM
Last Post: snippsat
  Writing string to file results in one character per line RB76SFJPsJJDu3bMnwYM 4 1,368 Sep-27-2022, 01:38 PM
Last Post: buran
  Print to a New Line when Appending File DaveG 0 1,217 Mar-30-2022, 04:14 AM
Last Post: DaveG
  Find and delete above a certain line in text file cubangt 12 3,459 Mar-18-2022, 07:49 PM
Last Post: snippsat
  CSV to Text File and write a line in newline atomxkai 4 2,685 Feb-15-2022, 08:06 PM
Last Post: atomxkai
  writelines only writes one line to file gr3yali3n 2 2,374 Dec-05-2021, 10:02 PM
Last Post: gr3yali3n
  [Solved] Reading every nth line into a column from txt file Laplace12 7 5,222 Jun-29-2021, 09:17 AM
Last Post: Laplace12
  blank graph with matplotlib from a csv file / data type issue arsentievalex 0 1,947 Apr-06-2021, 10:08 AM
Last Post: arsentievalex

Forum Jump:

User Panel Messages

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