i have a dataframe that looks like that:
import pandas as pd
df = pd.DataFrame({'Name' : ['A', 'A', 'B','C','C','C','D','D'],
'ID' : ['1', '1', '2','3','3','4','4','4'],
'duration' : ['600', '3000', '3000', '600', '3000', '3000', '600','3000']})
and i would like to get something like this:
Name ID 600 3000
A 1 1 1
B 2 0 1
C 3 1 1
C 4 0 1
D 4 1 1
i tried to use groupby put there seems to be missing one step