[Python] Creating groups from dataset based on time intervals [duplicate]

Discussão em 'Python' iniciado por Stack, Dezembro 17, 2024.

  1. Stack

    Stack Membro Participativo

    I am working on expanding a script I have made to do some reporting for one of our projects. I need to determine length of video, location and a few other attributes. This part works well when there is 1 video recorded in a log. However, sometimes there can be 2 + recordings inside a single log.

    Right now I am thinking it would work best off of the time field, which is in milliseconds. I have put a very small subset in the image below, some of the logs can be 10,000 rows long.

    Basically I am wondering how I would go about creating multiple groups based on if the video is recording (Video On = 1). Below would be two groups (900 to 1400ms and 2200 to 3000ms).

    Even some tips on what to look into would be greatly appreciated.

    [​IMG]

    Continue reading...

Compartilhe esta Página