I have the following series
s = pd.Series({'01','02','03,'01','02','03','01','02','03'})
And the following list
l = ['A','B','C']
What I want to do is every time we reach the 01 string value, I advance one value in my list index and start filling up the apply result with the 'B' value.
s = pd.Series({'A','A','A','B','B','B','C','C','C'})
I know i should use apply but i am having trouble formating the condition
s.apply(increment)
def increment(s):
l = ['A','B','C']
count = 0
if s == '01':
count += 1
# Something wenting array here
return l[count]