I have dataframe with measurments for differnt dates and hours:
>>>date hour value
0 29-11-2020 8 0.231
1 29-11-2020 9 0.245
2 29-11-2020 10 0.475
3 30-11-2020 8 0.214
4 30-11-2020 9 0.239
5 30-11-2020 10 0.312
...
The table described measured values for every day every hour. the measurments are taken from the third day of an experiment to day 15. I would like to create new column that will have the ordinal day of the experiment base don the dates, e.g:
>>>date hour value count
0 29-11-2020 8 0.231 3
1 29-11-2020 9 0.245 3
2 29-11-2020 10 0.475 3
3 30-11-2020 8 0.214 4
4 30-11-2020 9 0.239 4
5 30-11-2020 10 0.312 4
5 01-12-2020 8 0.312 5
5 01-12-2020 9 0.312 5
5 01-12-2020 10 0.521 5
...
(29-11 is the third day, 30-11 is the 2nd day...)
I have seen this post but it doesn't solve the same problem (they give repetative "codes" while I want to "count" unique dates from the 3rd day and give each date the ordinal number. I have also tried using "tooordinal" but it jsut changed the date values without count it.