pandas converting EXCEL date '1/0/1900' to ' 00:00:00'
I have this excel file that is being read by pandas into a dataframe , then output the dataframe contents to snowflake table.
I see that the excel date field with this (invalid) date value of '1/0/1900' is showing up in snowflake as '00:00:00' - while valid dates like '1/15/2022' is showing up in snowflake as '2022-01-16 00开发者_JS百科:00:00'. The snowflake date column is defined as a VARCHAR.
How do I code pandas in such a way that:
excel (invalid) date 1/0/1900 ---> snowflake date (varchar) field should show NULL (expected result)
excel date 1/15/2022 ---> snowflake date (varchar) field should show '2022-01-15' (expected result)
精彩评论