Skip to content
Advertisement

python with pandas to parse dates like “0001-11-29 13:00:00 BC”

I am trying to read some sql data using pandas library and one of the column “customer_date” has values like “0001-11-29 13:00:00 BC”. My query fails with error

ValueError: year 0 is out of range

Please suggest a way to parse such date/timestamps.

Here is my code.

JavaScript

Error:

JavaScript

Advertisement

Answer

This is what worked:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement