Home > Blockchain >  pandas - ParserError: Unknown string format: Timestamp
pandas - ParserError: Unknown string format: Timestamp

Time:06-27

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?

CodePudding user response:

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

  • Related