data = [
['30', '12', '42','mango'],
['30','30','100','apple'],
['10', '70','300','logo'],
['10','200','700','visiblelogo'],
['20','800','900','banana'],
['20','600','1000','fruit'],
['40','600','1200','visiblelogo'],
['40','1100','1300','logo'],
['90','2010','2100','orange']
]
df= pd.DataFrame(data, columns=['unique_id', 'start_frame',
'end_frame','heading'])
print(df)
Comparing start_frame
values should be greater than previous row end_frame
value. Else pick index and display. Omit when heading==logo
or visible_logo
.
Desired `output =[30,20]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…