I've a CSV file that looks like :
Timestamp Status
1501 Normal
1501 Normal
1502 Delay
1503 Received
1504 Normal
1504 Delay
1505 Received
1506 Received
1507 Delay
1507 Received
I want to add a new "Notif" column to dataframe that appears as a counter variable and has an increment when it comes across the "Received" value in the "Status" column. I want the output to look like :
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
I tried searching for the solution to this and various sources suggest to code using the arcpy package but I want to make this work without it as PyCharm doesn't seem to support arcpy package
Also tried using numpy to use as a conditional operator but that doesn't seem to work