I have update pandas from 0.20 to 0.21.1 (anaconda distribution) and I have an message error: "TypeError: Already tz-aware, use tz_convert to convert." when I executed this code with python 0.20 it worked perfectly !!
PvBrut['Date'] = PvBrut.Date.dt.tz_localize('UTC').dt.tz_convert('Europe/Paris')+timedelta(minutes=5)
Datetime is already localized to a timezone, UTC.
Don't call .tz_localize on it. Just convert it by using .tz_convert('UTC')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With