Sunday, 18 December 2022

Pandas time stamp column column having issues reading to redshift

I have a dataframe that looks like this

d = {'Timestamp': ['Nov 16 10:39:54', 'Nov 16 10:39:54', 'Nov 16 10:39:54', 'Nov 16 10:39:54', 'Nov 16 10:40:17']}
df_sample = pd.DataFrame(data=d)
df_sample.head()

Redshift seems to throw an error when I try to load this into a table. I get this error

ProgrammingError: {'S': 'ERROR', 'C': '42601', 'M': 'syntax error at or near "Full"', 'P': '88', 'F': '/home/ec2-user/padb/src/pg/src/backend/parser/parser_scan.l', 'L': '732', 'R': 'yyerror'}

It could be a different column but nonetheless how would I convert this to a more normal datatime?



from Pandas time stamp column column having issues reading to redshift

No comments:

Post a Comment