I have a dataframe that looks like this with column names as dates;
2013_11 | 2013_12 | 2014_01 | 2014_02 | 2014_03 |
NA | NA | 3 | 3 | N |
2 | 2 | 3 | NA | NA |
NA | NA | NA | NA | NA |
I need to write some sort of logic function that will filter out only the rows I am looking for. I need to pull only rows that did NOT have a number for any month in 2013 (first two columns), but DID have at least 1 number in any of the 2014 columns.
So the code would only pull back the first row for me;
NA | NA | 3 | 3 | N |
I can't figure out the most efficient way to do this, as I have about 8 million rows.