A sample of the list looks like this:
{{"September 29", "2.2300"}
, {"September 30", "2.2075"}
, {"October 1", "2.1825"}
, {"October 2", "2.1400"}
, {"October 3", "2.1500"}
, {"Sep 29 - Oct 3", "2.1820-AVG"}
, {"October 6", "2.1500"}
, {"October 7", "2.1600"}
, {"October 8", "2.1600"}
, {"October 9", "2.1650"}
, {"October 10", "2.1975"}
, {"Oct 6 -10", "AVG: 2.1665"}}
All values are strings.
I want to remove the weekly summary list items that contain "AVG". As you can see, "AVG" can occur at the beginning or at the end of a string.
I could count the items of the list and simply Delete the offending items... but I'd kinda like to do it in one fell swoop since this occurs in multiple lists (one year of data in each list).
I've tried lots of things and checked quite a few topics here without success. Could you help me out? Thank you.
Cases
Select
Pick
and many others.DeleteCases[data, {_, _?(! StringFreeQ[#, "AVG"] &)}]
$\endgroup$