I want to check whether row in data frame (pandas) is a sub-row of a specified row. All columns have True/False values. e.g: specified row is 11010 with 5 columns and the sub-row is 10000, the 11110 is not. Clearly, sub-row only contain True values if and only if father-row has True values at corresponding columns. I have a data frame below:

    A   B     C      D    E 
1 True False True False False 
2 True False False True False
3 True True False False True

Input row: specified row True False True True True Expected output is the first and second row Thanks for help!

0 Answers