I have pandas dataframe where DateTime column has dtype as Timestamp and want to change all the years in the date which are 2019 to 2018 (as this are misprint). Following is the sample, I have more columns than these and don't want to affect the corresponding values. This example only has limited rows I have a big dataset with many values as 2019.
DateTime Object
2018-02-12 10:32:00 A
2018-02-12 10:37:00 B
2018-02-12 10:48:00 C
2018-02-12 11:15:00 D
2019-02-02 12:50:00 E
2019-02-15 09:45:00 F
2018-06-22 07:14:00 G
Output expected:
DateTime Object
2018-02-12 10:32:00 A
2018-02-12 10:37:00 B
2018-02-12 10:48:00 C
2018-02-12 11:15:00 D
2018-02-02 12:50:00 E
2018-02-15 09:45:00 F
2018-06-22 07:14:00 G