I would like to know whether there is a way to change a number on a specific position in a datetime?
I have a dataframe [df] like this:
id created_at diff
1 2020-04-08 14:30:47 89
2 2020-04-08 14:30:47 0
3 2020-04-08 15:30:47 78
4 2020-04-08 15:30:47 0
I would like to change the created_at value for the rows with diff = 0, where I would like to add 10 minutes, or at possibly change number on positon 15 by adding 1.
The desirable result would look like this:
id created_at diff
1 2020-04-08 14:30:47 89
2 2020-04-08 14:40:47 0
3 2020-04-08 15:30:47 78
4 2020-04-08 15:40:47 0
Is there any way of doing this? Thank you very much for any suggestions!