【ERROR】ValueError: Of the four parameters: start, end, periods, and freq, exactly three must be spec

ValueError: Of the four parameters: start, end, periods, and freq, exactly three must be specified

Wrong wording:

print(pd.date_range(start='20201001',end='20201203',periods=5,freq='2D'))

Only 3 of the 4 parameters of start, end, periods, and freq can be set, otherwise an error will be reported

The source code in pandas is as follows:

 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"
           )

Guess you like

Origin blog.csdn.net/weixin_51656605/article/details/110551406