Sorry, I'm pretty sure that somebody else may have asked this question already but I did not find it. I'd like to keep track the number of times I've seen this specific item like
Input :
[88,88,27,0,88]
Desired Output :
[1,2,1,1,3]
I'm looking for something especially good in terms of performance. I'm ok with Numpy or Pandas solutions.