From 077d6a9dc042a0293080f0b0f70962f87cb867e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n?= Date: Wed, 17 Oct 2018 14:59:28 +0200 Subject: [PATCH] Fix #23198 --- pandas/core/arrays/datetimes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 0f07a9cf3c0e0..92d397e9ababc 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -239,7 +239,7 @@ def _generate_range(cls, start, end, periods, freq, tz=None, if end is not None: end = Timestamp(end) - if start is None and end is None: + if start is None or end is None: if closed is not None: raise ValueError("Closed has to be None if not both of start" "and end are defined")