2

I am new to pandas and trying to read a date from excel. For validation, when I use 'pd.to_datetime' to compare against another datetime object, for date 9999-12-31, I am getting an exception: 'OutofBoundsDateTime', whereas I believe this should still be a valid MAXDATE as per standards. Here is a sample code where I am facing such issue:

import pandas as pd
df = pd.DataFrame(["9999-12-31"])
pd.to_datetime(df[0])

Executing the above code results into OutofBoundsDateTime exception. Whereas if I choose any other date, there is no such exception.

Balaji Ambresh
  • 4,977
  • 2
  • 5
  • 17

0 Answers0