标签: python pandas datetime
enter image description here
我正在解决该怎么做。我需要逐年的日期时间数据进行时间序列分析(如 1974、1975 ... 2020)。但我每行都得到 1970。请问有人可以帮忙吗?
答案 0 :(得分:0)
尝试以下日期格式。
df.Period = pd.to_datetime(df.Period, format='%Y')