I have the dataframe in Python that looks like below:
BatchID | EventTime
Test1 | 2020-03-10 10:22:21
Test1 | 2020-03-10 10:22:27
Test1 | 2020-03-10 10:22:31
Test2 | 2020-03-10 10:36:00
Test2 | 2020-03-10 10:36:02
Test2 | 2020-03-10 10:36:04
I want to restructure it such that it looks like as shown below:
BatchID --> Batch Start --> Batch End
Test1 --> 2020-03-10 10:22:21 --> 2020-03-10 10:22:31
Test2 --> 2020-03-10 10:36:00 --> 2020-03-10 10:36:04
Where for every unique Batch ID, I want to pick the start time and end time and frame it into one row.