Filtering Columns by Contents of Rows
7 views (last 30 days)
I have arrays that look like this:
1 NaN NaN
2 3 4
2 5 NaN
I want to remove columns that contain rows with less than n non-NaN entries. In this case, with n=2, the first column of A would be removed, since the first row contains only 1 non-NaN value. The resulting array would be:
Is there a compact way to do this? I hope this explanation makes sense!