【发布时间】:2020-05-22 07:49:02
【问题描述】:
我想在数据框中添加格式为“%Y-%m-%d”的空白日期列。我试过datetime.datetime.strptime('0000-00-00',"%Y-%m-%d")
但我收到一个错误ValueError: time data '0000-00-00' does not match format '%Y-%m-%d'
如何创建格式为“%Y-%m-%d”的空白日期列?
在 R 以下的作品中。
df$date =""
class(df$date) = "Date"
如何在 Python 中实现这一点?
谢谢。
【问题讨论】:
-
参数must fit 的范围如下:1
-
python中的日期时间限制在
1677-09-21 00:12:44到2262-04-11 23:47:16