# Delete a whole nested list if one of the values in that list contains an “Indeterminate” value

I'd like to delete a whole nested list if one of the values in that list contains an "Indeterminate" value.

The link below provides a solution to delete individual "Indeterminate" values:

Delete indeterminate and infinite expressions

However, is there a way to delete a whole nested list, if at least one value of that list is Indeterminate.

For example.

a = {{1,2,3},{4,5,Indeterminate},{7,8,9},{10,11,12}}


Becomes

a = {{1,2,3},{7,8,9},{10,11,12}}

• Consider also positive filtering, e.g. Cases[a, {__?NumericQ}]. – Mr.Wizard Nov 20 at 18:25

One way:

{{1, 2, 3}, {4, 5, Indeterminate}, {7, 8, 9}, {10, 11, 12}} /.
{___, Indeterminate, ___} -> Nothing
(* {{1, 2, 3}, {7, 8, 9}, {10, 11, 12}} *)


One other consideration: we generally recommend that you avoid using capital letters to begin your symbols, to avoid colliding with built-in symbols.

• Thank you. I've corrected the the text based on your comment – reemodels Nov 20 at 15:07

You can use Select

A // Select[Not@MemberQ[#, Indeterminate] &]
(* {{1, 2, 3}, {7, 8, 9}, {10, 11, 12}} *)


Some other options

Select[ContainsNone[{Indeterminate}]][a]
(* {{1, 2, 3}, {7, 8, 9}, {10, 11, 12}} *)

Pick[a, ContainsNone[{Indeterminate}] /@ a]
(* {{1, 2, 3}, {7, 8, 9}, {10, 11, 12}}*)