# Feature request: Remove Empty Rows: Option to remove/retain missing value cells

**URL:** <https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238>\
**Category:** Cheminformatics\
**Created:** [December 28, 2019, 10:52pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238 "2019-12-28T22:52:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [December 28, 2019, 10:52pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/1 "2019-12-28T22:52:56Z")

</div>

Hi,

Sometimes the flow produces a table with totally empty rows (has row ID but no columns). Here we cannot use the Empty Table Switch node unless we use the Remove Empty Rows node first. But this node removes missing value cells (if no other value is available in the row) as well which in some cases is undesired.

How about adding an option to choose between removing and retaining missing cells?

😊

---

<div class="post-metadata">

**Author:** ![natanzi](https://forum-cdn.knime.com/user_avatar/forum.knime.com/natanzi/32/50615_2.png) [@natanzi](https://forum.knime.com/u/natanzi)\
**Post date:** [December 29, 2019, 7:35am UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/2 "2019-12-29T07:35:32Z")

</div>

This is the things that I have been looking for …

![image](https://forum-cdn.knime.com/uploads/default/original/2X/7/780012afb3a55021ee5cd2d0f2948cece9930193.png)

its really needed:  
“adding an option to choose between removing and retaining missing cells”

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [January 17, 2020, 1:45pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/3 "2020-01-17T13:45:54Z")

</div>

Hi there @armingrudd,

from node description seems to me that Remove Empty Rows node is for _removing all rows that contain only missing values_ so having option to choose between removing and retaining missing cells would be a bit contradictory. Anyways I add @swebb as I got a feeling he knows more about it 🙂

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 1:59pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/4 "2020-01-17T13:59:50Z")

</div>

Indeed, the node is supposed to remove rows that **only** have missing values i.e. every column in the row must have a missing value.

I’m not sure if @armingrudd is saying it’s removing rows when some columns do have values and some don’t? If so this is a bug, if not then I’m not sure I follow.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 3:25pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/5 "2020-01-17T15:25:57Z")

</div>

As a follow up, I just ran a test locally and the node behaves as I expect it to.

This input:

![image](https://forum-cdn.knime.com/uploads/default/original/2X/b/bea5847e1e46c603ebe1efc14d6b1732ff492574.png)

Becomes this output:

![image](https://forum-cdn.knime.com/uploads/default/original/2X/c/c7a9c053c21b59d74d7be76b7fe30a6ac97e0e2a.png)

The rows that have only missing values have been removed. Rows that have at least 1 value are kept. This is the purpose of the node. I’m not sure how a dialog option would make sense here.

Could you provide me an expected input and desired output so I can understand a bit better what you want?

There’s also the Row Splitter (col+) node which can split a table based on missing values.

This config will put rows with a missing value anywhere in the second output:

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/6/6f5626b90810da2bc8150ced0cde09cbf31012a3.png)

This config will put rows where all cells are missing to the second output:

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/c/ca1cd37a1a957c4d4af2b0d2ebbf21b74c2c30cd.png)

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![s.roughley](https://forum-cdn.knime.com/user_avatar/forum.knime.com/s.roughley/32/366_2.png) [@s.roughley](https://forum.knime.com/u/s.roughley)\
**Post date:** [January 17, 2020, 3:42pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/6 "2020-01-17T15:42:55Z")

</div>

I _think_ that @armingrudd means that when he has no columns in the table, he then cannot use the empty row filter on the table to remove all the rows, but even though the table is empty in the sense that it has no cells, it still registers in the Empty Table Switch node as being non-empty because it has rows, which is presumably why he would then like to use the Remove Empty Rows node. My apologies Armin if I’ve got that completely wrong!

Steve

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 4:02pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/7 "2020-01-17T16:02:11Z")

</div>

You explained my point perfectly. Thank you @s.roughley .

😊

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 4:03pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/8 "2020-01-17T16:03:39Z")

</div>

Ah ok.

So if the table has rows but no columns remove all rows. If the row has columns don’t do anything?

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 4:08pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/9 "2020-01-17T16:08:24Z")

</div>

The workflow is running automatically. sometimes all columns are filtered. but row IDs remain. So the Empty Table Switch does not work. so I need to remove rows first. But that makes some problems when the table has columns but some rows have missing values which we need to keep for further process. but the Remove Empty Rows node removes them.

I think it means adding an option to choose whether remove missing rows or void rows.

😊

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 4:13pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/10 "2020-01-17T16:13:58Z")

</div>

Got it so my definition (and thus the node’s) of an empty row is rows that have no data.

Another definition is rows that have no columns. You’d like a checkbox to toggle between those two options on the node.

I think that’s doable.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 4:16pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/11 "2020-01-17T16:16:32Z")

</div>

when the table has columns so there would not be any void rows. there the “remove missing rows” option would work.  
and if there is no columns, there would be no missing values and only void rows. there the “remove void rows” would work.

I think we need 2 check box for each. (maybe one needs the void row IDs)

Thank you @swebb

😊

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 4:54pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/12 "2020-01-17T16:54:09Z")

</div>

Your post was brought to my attention at a lucky time for you.

Unless something goes wrong the node should have the following options within the next hour (nightly update site):

![image](https://forum-cdn.knime.com/uploads/default/original/2X/0/07637f806385e04a899966f48313facf0fefb627.png)

So you can now select to remove:

1. Only rows with no columns
2. Only rows with entirely empty cells
3. Rows with either of the above
4. Neither 1 or 2 - node does nothing

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 5:00pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/13 "2020-01-17T17:00:14Z")

</div>

Great job @swebb. Thank you so much.

😊👍

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 6:34pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/14 "2020-01-17T18:34:16Z")

</div>

You’re welcome.

It looks like it’s now available in the nightly/trunk build. If you could let me know if this works as expected I’ll then migrate it over to 3.7, 4.0 and 4.1.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 6:53pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/15 "2020-01-17T18:53:25Z")

</div>

I think radio option would be better in this case since both cases would not occur simultaneously.

😊

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 17, 2020, 6:54pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/16 "2020-01-17T18:54:04Z")

</div>

Wouldn’t occur on a given input but if you want to remove either instance in a loop a radio button wouldn’t let you do that. For example how the node used to work.

But allowing people to select neither may not be appropriate without a warning so maybe that should be added.

---

<div class="post-metadata">

**Author:** ![armingrudd](https://forum-cdn.knime.com/user_avatar/forum.knime.com/armingrudd/32/84633_2.png) [@armingrudd](https://forum.knime.com/u/armingrudd)\
**Post date:** [January 17, 2020, 8:26pm UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/17 "2020-01-17T20:26:04Z")

</div>

Thanks again for your quick support. I just tested the node and it does the job perfectly.

😊

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [January 20, 2020, 9:35am UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/18 "2020-01-20T09:35:58Z")

</div>

Nice one guys 👍  
Ivan

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 20, 2020, 10:16am UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/19 "2020-01-20T10:16:29Z")

</div>

I have merged the changes into 3.7, 4.0 and 4.1. Should be available tomorrow if not builds fail. Available in nightly until then.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [January 27, 2020, 10:16am UTC](https://forum.knime.com/t/feature-request-remove-empty-rows-option-to-remove-retain-missing-value-cells/20238/20 "2020-01-27T10:16:37Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
