How can I convert a "yyyy-MM-dd'T'HH:mm:ssZ'" format in a dataframe to a datetime format that I can further format to an index
2021-01-02T05:22:58.000Z
is one of the dates in the dataframe
i've tried this line of code:
df['created_at_tweet']= pd.to_datetime(df['created_at_tweet'], format=("yyyy-MM-dd'T'HH :mm:ss.SSS'Z'"))
but i get the error
ValueError: time data '2021-01-02T01:43:32.000Z' does not match format 'yyyy-MM-dd'T'HH :mm:ss.SSS'Z'' (match)
any ideas?