How do I make a list or column in pandas which number in this column increase itself by step of 1 and when it hits an certain number (let's say 5) it return to 1 and repeat this process? My scripts like below and it won't work as expected:
i = 0
lista = []
for i in range(50):
i += 1
if i == 5:
continue
lista.append(i)
print(i)
# what I wanted from this code is like :
1
2
3
4
5
.
.
.
# repeat printing 1-5 for 10 times