I've got a readings DataFrame that consists of two columns, experiment
and value
. experiment
keys into an experiments DataFrame; there are 500 rows in a row with the same experiment
and different value
representing 500 readings on the same experiment where the order in the DF is the order the data was taken. Then 500 for the next experiment, etc.
I want to look for time-based trends in the experiments, so I assume that I want to label each point pos
in 0-499 and then groupby('pos')
. How do I create that pos
column, an incrementing value that resets to 0 every time experiment
resets? Which is, I guess, the same as the number of rows that experiment
has been constant for.