Data filtering large array
显示 更早的评论
I need to filter data in a large dataset (300.000+). The column which needs filtering consists of values 'a|b' per row. There are a lot of the same 'a|b' values in the column, but not every combination has the same length (i.e. 'a|b' is 4x in the column, but 'c|b' is 9x in the column).
The first combination needs to stay, in this case 'a|b' and all other options with 'b' as second number needs to be deleted.
Example: Column: a|b, a|b, a|b, c|b, c|b, d|e, d|e, f|e, f|e, f|e.
The solution should be: a|b, a|b, a|b, d|e, d|e.
Any help would be greatly appreciated.
1 个评论
Geoff Hayes
2014-11-4
Paul - you may want to attach a file that includes a subset of your data so that we can get a better idea of what its contents. When you stay that the not every combination has the same length, do you mean that some rows have four columns, and others have nine?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Managing Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!