I have a dataframe that is formatted the following way -
'''
ids size
[A, B, C, D, E, F] 100
[C,D,E] 50
[C,D,E,F,G] 200
[D,E,F,G,H] 190
[E,F,G,H] 100
[K, L, M, N] 200
'''
This dataframe has thousands of rows and numerous ID combinations. Dealing with lists is a bit of a pain. I am able to remove the [C, D, E] entry using issubset
What I would like to do is keep the unique id groupings that have the largest size (in this case, C, D, E, F, G). Because the other entries common to the largest one, I am not interested in those. The only ones that should survive are C, D, E, F, G and K, L, M, N. Is there a way to handle this in Pandas?