I am trying to figure out how to do the following. I deal with a number of records over 24 hours, split into hourly episodes. For example (please excuse the pipe, that is to indicate the new column along):
Hour |Episodes
0 | 3
1 | 2
2 | 6
What I need to do is to create a new column which has hour 0 filled down 3 times (for each of 3 episodes), Hour 1 likewise filled down 2 times, for 2 episodes,; hour 2 filled down 6 times for 6 episodes. So the resulting column would be:
0
0
0
1
1
2
2
2
2
2
2
I'll be dealing with many hundreds of records more than this but hopefully this gives an idea
Bookmarks