Quantcast
Viewing all articles
Browse latest Browse all 188

How do I remove parts of this data?

The data:

{{9.99758, 0}, {"", ""}, {10.0178, -21.7137}, {"", ""}, {10.038,   28.5723}, {"", ""}, {10.0582, 0.52409}, {"", ""}, {10.0784,   21.7378}, {"", ""}, {10.0987, 0}, {"", ""},...}

I need to remove the empty points, i.e. the {"", ""}, parts. I either need to find that pattern and remove it or simply remove every other point in this list.

In attempting to remove by pattern, I tried doing data /. Part[data, 2] -> "" but this returned:

{{9.99758, 0}, "", {10.0178, -21.7137}, "", {10.038,   28.5723}, "", {10.0582, 0.52409}, "", {10.0784,   21.7378}, "", {10.0987, 0}, "", {10.1189, 3.13778}, "",...}

How would I then finish it off by removing the "", part?


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>