I have a pyspark dataframe 

```
   +----------+----------+---------------------+
   | Activity | Interval |    ReadDateTime     |
   +----------+----------+---------------------+
   |    A     |    1     | 2019-12-13 10:00:00 | 
   |    A     |    2     | 2019-12-13 10:00:00 |
   |    A     |    3     | 2019-12-13 10:00:00 |
   |    B     |    1     | 2019-12-13 11:00:00 | 
   |    B     |    2     | 2019-12-13 11:00:00 |
   |    B     |    3     | 2019-12-13 11:00:00 |
   +--------- +----------+---------------------+

```

Now I have to add 5 minute to the ReadDateTime column based on the value present in previous row. My expected dataframe looks like below

```
   +----------+----------+---------------------+
   | Activity | Interval |    ReadDateTime     |
   +----------+----------+---------------------+
   |    A     |    1     | 2019-12-13 10:00:00 | 
   |    A     |    2     | 2019-12-13 10:05:00 |
   |    A     |    3     | 2019-12-13 10:10:00 |
   |    B     |    1     | 2019-12-13 11:00:00 | 
   |    B     |    2     | 2019-12-13 11:05:00 |
   |    B     |    3     | 2019-12-13 11:10:00 |
   +--------- +----------+---------------------+

```

I will not add 5 minutes to ReadDateTime column corresponding to Interval 1 whereas i will keep on adding 5 minutes to the other rows until my activity changes