0

I have the following dataframe

enter image description here

I want to create a new dataframe which will copy each row as per its count variable which would be like this :

new data frame

How to calculate arrivaltime during this repetition: arrival time will be calculated like this: it will have value of offset if count was 1 and if count was more than 1 it will add interval columns value to offset and it will keep adding interval's value for that repetitive row.

enter image description here

Help me to achieve this Thanks in Advance.

  • 2
    Does this answer your question? [Replicating rows in a pandas data frame by a column value](https://stackoverflow.com/questions/26777832/replicating-rows-in-a-pandas-data-frame-by-a-column-value) – Dishin H Goyani Mar 26 '20 at 11:33
  • hi @DishinHGoyani, this really solved my problem but I have one more doubt please check edited question, thanks . – Aman Swarnkar Mar 26 '20 at 12:17
  • please make it new question it seems different question. No one could answer once it mark as duplicate or until someone undo duplicate. – Dishin H Goyani Mar 27 '20 at 04:53

0 Answers0