I am trying to read data from Redshift database to a dataframe. My table has a couple of timestamp fields. When I run the code it gives the following error:
rows = dbapi_cursor.fetchall()
ValueError: year -1 is out of range
The error traces back to this line:
sql_query = pd.read_sql_query(query, rs_conn)
I have seen a couple of other questions on stackoverflow, which talk about timestamps out of the min and max range and also some other answers which talk about dividing by 1000.
But how do I do it here? I am totally stumped on this, so any help here will be appreciated.