0
$\begingroup$

Any idea how to filter this dataset to exclude blank values in FlightPath?

Example Dataset with blank FlightPath Values

$\endgroup$
1
  • $\begingroup$ Welcome to the Mathematica Stack Exchange. Please load a representative dataset (in copy-paste-able form) so that potential respondents can experiment with it. Thanks. $\endgroup$
    – Syed
    Commented Apr 8, 2022 at 19:16

1 Answer 1

1
$\begingroup$

If you just want to exclude them why won't you delete positions where these appear. (or use it to apply select and Cases Methods)

ds = {<|"a" -> 1, "b" -> "x", "FlightPath" -> {1}|>, <|"a" -> 2, 
"b" -> "y", "FlightPath" -> {2, 3}|>, <|"a" -> 3, 
"b" -> "z"|>, <|"a" -> 4, "b" -> "x", 
"FlightPath" -> {4, 5}|>, <|"a" -> 5, "b" -> "y"|>, <|"a" -> 6, 
"b" -> "z", "FlightPath" -> "2"|>} // Dataset;

enter image description here

pos = Position[ds[All, "FlightPath"], _Missing];
ds1 = ds[Delete[pos], All];

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.