0

I have a dataframe that contains two columns, one with dates and one with cashflows that I pass this into an XIRR function. The dates column, call this df['dates'], is a series of strings in the format "YYYY-MM-DD" that I have tried to convert to datetime using pd.to_datetime(df['dates']). These dates range from 2016-01-01 to 2523-05-23

However, I run into the error

ValueError: time data 2262-04-12 doesn't match format specified

Which I am assuming occurs because the pd.timestamp.max() is 2262-04-11. How can I convert this column of strings into dates that can overflow the max timestamp?

Thanks!

Kyle
  • 53
  • 5
  • Does this answer your question? [pandas out of bounds nanosecond timestamp after offset rollforward plus adding a month offset](https://stackoverflow.com/questions/32888124/pandas-out-of-bounds-nanosecond-timestamp-after-offset-rollforward-plus-adding-a) – Francesco Aug 14 '20 at 18:39
  • hey thanks for the response but it doesn't answer how to convert past the 2262 timestamp – Kyle Aug 14 '20 at 20:07
  • Inspect your data because you should get a `OutOfBoundDatetime` error and not a `ValueError`. However, have a look [here](https://pandas-docs.github.io/pandas-docs-travis/user_guide/timeseries.html#timeseries-oob). – Francesco Aug 14 '20 at 18:39

0 Answers0