I am attempting to use AstronomicalData
and DeleteCases
together to remove invalid cases of two properties while listing the corresponding name which the data belongs to.
I can only selectively choose one of the two properties in which to remove invalid cases from.
An example of two selected properties with the first property being filtered;
DeleteCases[Transpose[{
AstronomicalData["Exoplanet", P1], AstronomicalData["Exoplanet", P2], AstronomicalData["Exoplanet"]
}],{_Missing,_,_}],
The issue is having a limitation of defining either P1
or P2
as the chosen property to remove invalid cases from. I have tried various ways of correcting this and can't apply it to both properties.
I can switch which property it acts upon by swapping the slot _Missing is defined in like this;
{_Missing,_,_}
{_,_Missing,_}
Defining both slots doesn't apply the function to either individual property like this;
{_Missing,_Missing,_}
How can I achieve being able to filter the results where if either property has an invalid value the data is dismissed?
{___, _Missing, ___}
this should delete any row wit Missing value. You can useFreeQ
/MemberQ
withPick
or withSow
+Reap
too. $\endgroup$Sow
+Reap
, I'll have to look further into them. Do you mind mentioning why the solution only works while _Missing is defined in#2
? $\endgroup$BlankNullSequence
is the key, take a look at documentation. $\endgroup$