如何使用SQL/Python将序号转换成日期格式?

How to convert the sequential number into date format using SQL/Python?

在零售数据集 (CSV) 中,我有一列“日”,它的值从 1 到 712(大约两年的数据)。我想将其转换为“yyyy-MM-dd”格式。起始时间戳是 2017-01-01。

ACTUAL:

Day, Prod_id, Sales
1, 23232, 34.5
1, 34522, 76
2, 53436, 45.7
2, 67353, 12.5
.....
.....
712, 35357, 67.2

EXPECTED:

Day, Prod_id, Sales, TS
1, 23232, 34.5, 2017-01-01
1, 34522, 76, 2017-01-01
2, 53436, 45.7, 2017-01-02
2, 67353, 12.5, 2017-01-02
.....
.....
712, 35357, 67.2, 2018-12-25

请帮我实现这个。

在 Hive 中使用 date_add('2017-01-01', day) as ts