Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timestamp Status
- 1501 Normal
- 1501 Normal
- 1502 Delay
- 1503 Received
- 1504 Normal
- 1504 Delay
- 1505 Received
- 1506 Received
- 1507 Delay
- 1507 Received
- Timestamp Status Notif
- 1501 Normal N0
- 1501 Normal N0
- 1502 Delay N0
- 1503 Received N1
- 1504 Normal N1
- 1504 Delay N1
- 1505 Received N2
- 1506 Received N3
- 1507 Delay N3
- 1507 Received N4
- Timestamp Status Notif
- 1501 Normal N0
- 1501 Normal
- 1502 Delay
- 1503 Received N1
- 1504 Normal
- 1504 Delay
- 1505 Received N2
- 1506 Received N3
- 1507 Delay
- 1507 Received N4
- df['Notif'] = None
- counter = 0
- for idx, row in df.iterrows():
- if df.iloc[idx, 1] == "Received":
- counter +=1
- df.iloc[idx,-1] = "N" + str(counter)
- df.drop_duplicates(subset='Notif', keep="first")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement