I am using pandas library in python for the following:
i currently have a dataset that looks like this :
ID START END
x 450 600
y 100 500
. . .
Here start and end represent footmarks, ie a vessel was parked here from point x to y.
What i want to do is create binary columns 1, 2 3... till the max value in 'END' and have it show a 1 if that column number is within the range of 'START' to 'END'
what i want to accomplish here is finding the total number of times all the footmarks have been used. Right now my approach is to have the binary columns and sum them up to get the total count.
I am also open to better methods of solving my problem.
edit_1:
What i want -
ID START END 1 2 3 ...... 450 ..... 500 .... 600 601
x 450 600 0 0 0 1 1 1 0
y 100 500 0 0 0 1 1 0 0
. . .