I'm trying to convert the string '2021-03-11 09:30:01-05:00' to a datetime using the following code.
It seems that my string as a colon (:) between 05 and 00 and that this colon is not in the default %z date format.
How can I convert my string to an EST datetime?
df = pd.read_csv(mypath + "ticks.csv")
df['time'] = pd.to_datetime(df['time'], format="'%Y-%m-%d %H:%M:%S%z'")
df['time'] = df['time'].dt.tz_localize('US/Eastern')