I'm a python newbie and I'm attempting to convert a column of combined dates and times to a different timezone using Pandas and Pytz (although I'm not married to Pytz). My data, called "data01," looks like this:
Activity Date
2016-10-25T00:40:56Z
2016-12-12T16:45:35Z
I'm able to convert those times individually copy/pasting using pytz, but when I'm trying to convert the entire column it errors out. I presume I need to localize it to UTC and then convert it to the desired timezone.
I've tried things like:
import timezone from pytz
import pandas as pd
from datetime import datetime
raw_data01['Activity Date'] = pd.to_datetime(raw_data['Mycol'], format = '%Y:%m:%dT%H:%M:%SZ')
Amongst others. I did my code at work and can't recall the 17 different errors nor copy paste it