I have
mydata= {{{2017, 1, 1}, 116.461, 61.7762, 65.4011},
{{2017, 1, 8}, 117.577, 61.6386, "NA"},
{{2017, 1, 15}, 118.525, 61.6779, 45.62},
{{2017, 1, 22}, 120.451, "NA", "NA"},
{{2017, 1, 29}, 127.494, 62.602, 85.25},
{{2017, 1, 29}, "NA", 62.602, 88.25}};
I am looking for different ways to delete all data points of all rows that have at least one "NA". My result should be as fallow:
myresult = {{{2017, 1, 1}, 116.461, 61.7762, 65.4011},
{{2017, 1, 15}, 118.525, 61.6779, 45.62},
{{2017, 1, 29},127.494, 62.602, 85.25}};
Although this example has just a few rows and a few columns, my actual data has many more rows and columns. Here is related question but answer was not much helpful for me. Here is related question from stackoverflow.com. Any help is greatly appreciated.
Select
andFreeQ
. If you need better performance the three argument form ofFeeQ
may help. $\endgroup$ – b3m2a1 Sep 2 '17 at 23:41Pick[mydata,Not[MemberQ[#,"NA"]]&/@mydata]
$\endgroup$ – Nasser Sep 2 '17 at 23:44