pandas – ParserError: Unknown string format: Timestamp


I have date strings that’s generated using unix milliseconds.

This is how the date string looks like.

2020-01-01 00:04:59.999.

I saved the data into a csv file.

I’m loading the data using pd.read_csv and then I’m trying to parse the date like this.

df = pd.read_csv('data.csv')
df["Timestamp"] = pd.to_datetime(df["Timestamp"])

However, I’m getting the following error:

ParserError: Unknown string format: Timestamp

Can someone tell me how to fix the error?


It means that you have a Timestamp word instead of one of the dates

For example:

Timestamp, 3 
Timestamp, 3
2020-01-01 00:04:59.999, 3

Try to open your csv in any editor and search for Timestamp

Answered By – olegr

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published