Questions tagged [blank-line]

Blank-Line refers to any existence of an empty line of data or the creation of an empty line on a form created by the *enter* or *return* keys.

Blank-Line, when referring to data, is used in the description of any record in a table/query where data does not exist. This could be in reference to creating a blank line of data, or determining where a blank line of data exists.

Blank-Line, when referring to a form, is used in the description of any line which contains nothing but white space. This could be in reference to shifting data downward or upward in a form or report, or shifting controls downward or upward in a form or report.

237 questions
9
votes
6 answers

pandas read_csv remove blank rows

I am reading in a CSV file as a DataFrame while defining each column's data type. This code gives an error if the CSV file has a blank row in it. How do I read the CSV without blank rows? dtype = {'material_id': object, 'location_id' : object,…
Karvy1
  • 959
  • 6
  • 14
  • 25
9
votes
3 answers

Windows Batch: How to keep empty lines with loop for /f

I'm searching how to keep empty lines when I browse a file with a for loop. for /f "tokens=1* delims=[" %%i in ('type "test1.txt" ^| find /v /n ""') do ( SET tmp=%%i echo !tmp! >> test2.txt ) Actually it works for everybody, but as far as I'm…
Rom1
  • 346
  • 4
  • 17
8
votes
8 answers

Remove all blank spaces and empty lines

How to remove all blank spaces and empty lines from a txt File using Java SE? Input: qwe qweqwe qwe qwe Output: qwe qweqwe qwe qwe Thanks!
Shumon Saha
  • 1,415
  • 6
  • 16
  • 33
8
votes
0 answers

angular schematics generates blank lines in template, how to prevent it?

I have ng schematics template __name@dasherize__.component.html with content : <% for (let row of getComponents().rows) { %>
<% for (let field of row.fields) { %> <% if (field.type === 'InputString') { %>
user1063364
  • 791
  • 6
  • 21
6
votes
7 answers

How to automatically insert a blank row after a group of data

I have created a sample table below that is similar-enough to my table in excel that it should serve to illustrate the question. I want to simply add a row after each distinct datum in column1 (simplest way, using excel, thanks). _ CURRENT…
Ben
  • 1,013
  • 4
  • 16
  • 34
5
votes
4 answers

Remove lines from a file corresponding to blank lines of another file

I have two files with same amount of rows and columns. Delimited with ;. Example; file_a: 1;1;1;1;1 2;2;2;2;2 3;3;3;3;3 4;4;4;4;4 file_b: A;A;A;A;A B;B;;;B ;;;; D;D;D;D;D Ignoring delimiters, line 3 is empty from file_b. So I want to remove line 3…
5
votes
2 answers

Hide/Remove first newline/blank-line of html code-section using
 tag

I'm working on a website that has some code and I would like to write:

line 1
line 2
But that produces an empty line at the beginning like this as output [A Blank line in here that I don't want] line 1 line 2 I know…
Leonora Tindall
  • 1,391
  • 2
  • 12
  • 30
5
votes
1 answer

Distinguishing between blank lines and end of file in Python

A situation that I continually run into is the following: readFile = open("myFile.txt", "r") while True: readLine = readFile.readline() if readLine == "": #Assume end of file break #Otherwise, do something with the line …
jdrobers
  • 139
  • 1
  • 3
  • 9
5
votes
2 answers

sed replace multiple blank lines with single blank line

I have written a sed script, which replaces multiple blank lines with a single one, but it is not working as supposed to. I will be thankful to everybody, who can explain me why. Please do not refer me to working examples, I am familiar with Google.…
John Smith
  • 1,027
  • 15
  • 31
4
votes
3 answers

Filtering out empty strings in Snowflake

I have a very simple task which is turning out to be impossible. I have a column that has strings but also has blanks where it supposed to be a word (those are not NULLs they are just empty strings). For…
4
votes
4 answers

How can I insert blank rows every 3 existing rows in a data frame?

How can I insert blank rows every 3 existing rows in a data frame? After a web scraping process I get a dataframe with the information I need, however the final excel format requires that I add a blank row every 3 rows. I have searched the web for…
4
votes
1 answer

VSCode: Extension: folding section based on first blank line found or to the start of the next similar section

How can I make a VSCode extension folding strategy based on the first blank line following a starting folding marker? ## Some section --| Any text... | (this should fold) ...more text. --| (blank line) ##…
aamarks
  • 942
  • 10
  • 17
4
votes
1 answer

how to prevent that intellij delete all blank line?

When I write code, I indent Also the blank lines with tabs. But IntelliJ when I press delete button cancel entire line. Is it possible to prevent this action? I would like that Intellij delete space or tabs one at a time. Thanks.
apollo9
  • 131
  • 1
  • 8
4
votes
1 answer

Python: Why are there extra blank lines in the output when using write()?

Please consider the following Python 3.x code: class FancyWriter: def write(self, string): print('<'+string+'>') return len(string)+2 def testFancyWriter(): fw = FancyWriter() print("Hello World!", file=fw) …
anjokeyo
  • 41
  • 1
  • 5
4
votes
5 answers

Remove Blank ROWS from CSV files in php

Is it possible to remove all blank ROWS from a CSV file? I'm trying to count all rows from a CSV file but would like to exclude lines that doesn't contain a value on a specific column or the whole row. This is what I'm using to count the rows as of…
telexper
  • 2,381
  • 8
  • 37
  • 66
1
2
3
15 16