Skip to main content
added 67 characters in body
Source Link
C. E.
  • 71.2k
  • 6
  • 141
  • 269

I have not found good duplicate, and there is none in so maybe one can find this useful.

data = RandomChoice[{1, 2, 3, 4, Missing[]}, {100, 3}];

n = 100;

DeleteCases[data, {___, _Missing, ___}]                   ~Do~]~Do~{n} // Timing // First
Cases[data, {_?NumberQ ..}]                               ~Do~]~Do~{n} // Timing // First
Pick[data, FreeQ[#, _Missing] & /@ data, True]   True]~Do~{n} // Timing // First
Reap[Map[If[FreeQ[#, _Missing], Sow[#]] &, data]][[2, ~Do~1]]~Do~{n} // Timing // First
Reap[Map[If[FreeQ[#,data _Missing],/. Sow[#]]{___, &_Missing, data]][[___} 2,-> 1]]~Do~Sequence[]~Do~{n} // Timing // First
0.015625004289

0.009231

0.014014

0.022367

0.000167
0.015625
0.046875
0.078125

I have not found good duplicate, and there is none in so maybe one can find this useful.

data = RandomChoice[{1, 2, 3, 4, Missing[]}, {100, 3}];

n = 100;

DeleteCases[data, {___, _Missing, ___}]                   ~Do~{n} // Timing // First
Cases[data, {_?NumberQ ..}]                               ~Do~{n} // Timing // First
Pick[data, FreeQ[#, _Missing] & /@ data, True]            ~Do~{n} // Timing // First
Reap[Map[If[FreeQ[#, _Missing], Sow[#]] &, data]][[ 2, 1]]~Do~{n} // Timing // First
0.015625
0.015625
0.046875
0.078125

I have not found good duplicate, and there is none in so maybe one can find this useful.

data = RandomChoice[{1, 2, 3, 4, Missing[]}, {100, 3}];

n = 100;

DeleteCases[data, {___, _Missing, ___}]~Do~{n} // Timing // First
Cases[data, {_?NumberQ ..}]~Do~{n} // Timing // First
Pick[data, FreeQ[#, _Missing] & /@ data, True]~Do~{n} // Timing // First
Reap[Map[If[FreeQ[#, _Missing], Sow[#]] &, data]][[2, 1]]~Do~{n} // Timing // First
data /. {___, _Missing, ___} -> Sequence[]~Do~{n} // Timing // First
0.004289

0.009231

0.014014

0.022367

0.000167
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

I have not found good duplicate, and there is none in so maybe one can find this useful.

data = RandomChoice[{1, 2, 3, 4, Missing[]}, {100, 3}];

n = 100;

DeleteCases[data, {___, _Missing, ___}]                   ~Do~{n} // Timing // First
Cases[data, {_?NumberQ ..}]                               ~Do~{n} // Timing // First
Pick[data, FreeQ[#, _Missing] & /@ data, True]            ~Do~{n} // Timing // First
Reap[Map[If[FreeQ[#, _Missing], Sow[#]] &, data]][[ 2, 1]]~Do~{n} // Timing // First
0.015625
0.015625
0.046875
0.078125
Post Made Community Wiki by Kuba