Suppose I have the following data frame:
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 ... F1025 F1026 F1027 \
5005 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5006 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5010 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5013 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5016 6 6 6 6 6 6 6 6 6 6 ... 0 0 0
5017 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5019 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
5021 5 5 5 5 5 5 5 5 5 5 ... 0 0 0
5102 7 7 7 7 7 7 7 7 7 7 ... 1 1 1
5103 7 7 7 7 6 7 7 7 7 7 ... 7 7 7
5104 7 7 7 7 7 7 7 7 7 7 ... 0 0 0
5302 6 6 6 6 6 6 6 6 6 6 ... 0 0 0
5409 6 6 6 6 6 6 6 6 6 6 ... 2 2 2
5422 0 0 0 0 0 0 0 0 0 0 ... 0 0 0
5601 0 0 0 0 0 0 0 0 0 0 ... 0 0 0
5603 7 7 7 7 7 7 7 7 7 7 ... 7 7 7
Is there a way in Python that I can easily find the largest subset of features and indices that have 7's everywhere in the middle?
I realize this might be a greedy algorithm where I first pick all features, or I first pick all indices? I'm not sure the best way to tackle it.