I want to update my date column with certain times because some of the dates are not correct. For some reason, they key in the date with time between 00:00 and 7:30 with the day before.
For example:
date time
0 01-01-2022 01:00
1 01-01-2022 20:00
2 01-05-2022 03:00
2 01-07-2022 06:00
Which supposes to be like this:
date time
0 01-02-2022 01:00
1 01-01-2022 20:00
2 01-06-2022 03:00
2 01-08-2022 06:00
I know I can update all of dates with this code.
df["date"] = pd.to_datetime(df["date"]) + datetime.timedelta(days=1)
But I have no idea how to only update certain rows I want.
Does anyone know how to update the date column?