ValueError: Of the four parameters: start, end, periods, and freq, exactly three must be specified
错误写法:
print(pd.date_range(start='20201001',end='20201203',periods=5,freq='2D'))
start,end,periods,freq这4个参数只能设置3个,否则会报错
pandas中源码如下:
if com.count_not_none(start, end, periods, freq) != 3:
raise ValueError(
"Of the four parameters: start, end, periods, "
"and freq, exactly three must be specified"
)