create a df from another one based on the first and last occurance of the 1 in the df

Eklenme Tarih 1 hour ago
Active 19
Görüntülenme 89
S

create a df from another one based on the first and last occurance of the 1 in the df