This might have something to do with the pandas version.
When I checked it with python 3.6.8 (pandas==0.22.0), I also get the same error:

But it works fine with python 3.7.3 (pandas==0.24.2):

As per the documentation for pandas 0.22.0:
Of the three parameters: start, end, and periods, exactly two must be specified.
See the Notes section
Also checked it for the latest version of pandas. This is what it says:
Of the four parameters start, end, periods, and freq, exactly three must be specified. If freq is omitted, the resulting DatetimeIndex will have periods linearly spaced elements between start and end (closed on both sides).
See the Notes Section