I need to add a column to my dataframe that will add a number each time a value in another column surpasses a limit. Example below:
Original DF:
ColA ColB
4 1.4
10 0.5
1 2.3
3 12.2
8.8 8.5
2 5.2
0.6 0.33
9 3
4 144
33 8
Desired DF: Where value in ColB surpasses 10, ColC count = count +1
ColA ColB ColC
4 1.4 1
10 0.5 1
1 2.3 1
3 12.2 2
8.8 8.5 2
2 5.2 2
0.6 0.33 2
9 3 2
4 144 3
33 8 3
thank you for the help!