Questions about items that can be described as empty or having no data value
Questions tagged [is-empty]
776 questions
2
votes
1 answer
I know you can nest an IfElse statement in a ForEach loop, but is the opposite also possible?
Been using Powershell on and off for years but haven't really gotten into that much automation until now. What I'm trying to accomplish is running a statement based on input for a variable. Each statement will run just fine by itself. The ELSE…

Alyxander VanHelsing
- 23
- 3
2
votes
2 answers
Can't remove empty `character(0)` or `list()` values from R data frame
I have an R data frame that has character(0) and list() values inside the cells. I want to replace these with NA values.
In the following example, the field "teaser" has this issue, but it can be anywhere in the data frame.
df <- structure(list(body…

generic
- 302
- 1
- 3
- 14
2
votes
1 answer
Unexpected action of jq select filter
I have been using jq for quite a while, but some behaviour today has surprised me:
I expected this:
echo '{"Name":"NAME","Tags":[{"Key":"KEY","Value":"HASH"}]}' \
| jq '{"name": .Name, "hash": (.Tags[]|select(.Key=="hash")|.Value)}'
to produce…

jonseymour
- 1,006
- 1
- 12
- 22
2
votes
3 answers
Bash function for zero length string or with whitespace
In bash I can use -z string and -n string to see if the string length is zero or not.
Would like to write a bash function that returns true or false, not only if length is zero but also if it is all whitespace. Or is there a way without needing a…

Angio
- 57
- 1
- 5
2
votes
2 answers
How to check empty in variable in Google Apps Script
I have a variable that can be either empty, number or text. I like to find only empty one. But the following codes using .length returned null for 0 number, though it returned 1 for "0" string . .toString.length even didn't work. Any suggestion? …

Newbie
- 247
- 3
- 11
2
votes
4 answers
Check if Java object is Collection, Array or String and empty
I've got this method at the moment that I am trying to refactor.
public static boolean isEmpty(Object value) {
boolean empty = false;
if (value instanceof String && ((String) value).isEmpty()) {
empty = true;
} else if (value…

LockieR
- 370
- 6
- 19
2
votes
4 answers
What is the optimal way to check if a map contains any empty values or keys?
I have a map that stores a set of questions and answers. There cannot be questions with empty answers or answers with empty questions. Below is how I have initialized my map.
Optional

AnOldSoul
- 4,017
- 12
- 57
- 118
2
votes
1 answer
Function which tell whether the forms fields are empty or not
I would like to get back a true or false based on visible form elements, but not just inputs but radio and checkboxes too.
So far I have this code but something doesn't right. Once I filled in all the inputs it gives true.
function isAllFilled()…

levipadre
- 569
- 7
- 31
2
votes
1 answer
How to insert an empty string into a field in a flow action in Microsoft Power Automate
How do you insert an empty string into a field in a flow action in Microsoft Power Automate? Google results I've found say to use a 'null' expression and it should empty the field. However, it didn't work when I was using the Excel (Business)…

Anthony Miller
- 15,101
- 28
- 69
- 98
2
votes
2 answers
Laravel mailchimp event properties are empty in template
Did my research and found nothing about this topic.
In the docs: https://mailchimp.com/developer/marketing/guides/track-outside-activity-events/#create-an-event
Apparently said how to create an event with options, using the library that they said…

Rocam
- 31
- 4
2
votes
6 answers
Excel FILTER() returning 0 for blank cells
I suspect this has been asked previously, but I can't find it.
FILTER() will often return a 0 for blank rows, even when a return string is specified.
Using filter() I am often getting a 0 return value for empty cells. Assume these 6 rows of data in…

David Richardson
- 123
- 1
- 1
- 8
2
votes
4 answers
Python : How can I check if the content of one entire column of a Dataframe is empty?
I want to check if one entire column of a dataframe is empty ! So let's say that I have
data1 = [12,34,'',678,896]
data2 = ['','','','','']
df = pd.DataFrame(list(zip(data1,data2)),columns = ['Data1','Data2'])
print(df)
Data1 Data2
0 12
1 …

Maikiii
- 421
- 4
- 13
2
votes
3 answers
How to remove different types of empty values (elements) from JS array
Have an array
const arr = [1, 'abc', [], ['John'], {}, {name: 'Smith'}, null, 0];
How to get new array without empty values?
(empty array and empty object are also reckoned as empty values).
My variant seems to be a bit of hardcoded:
const newArr =…

holden
- 45
- 3
2
votes
1 answer
R Error: could not find function is_empty
I have tried to run an old script (R 3.4?) with R 4.0...
but it doesn't work.
is_empty(c(1,1,2,3))
Error in is_empty(c(1, 1, 2, 3)) :
could not find function is_empty
but ?is_empty still work.
Where am I wrong?

delaye
- 1,357
- 27
- 45
2
votes
4 answers
Java: Removing an empty Element from String Array
I have an array String ar[] = {"HalloWelt", " "};, ar.length is 2.
It does register two values within "HalloWelt" on index 0, and a blank/empty string on index 1;
I wonder how can I remove empty space on the index 1 - > but also keep it as a String…
user9935508