From 75952beda55951f8bc9f4d1efd1d5670669d9226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Taljaard?= Date: Wed, 29 Apr 2020 16:25:27 +0200 Subject: [PATCH] Remove deprecated Y and M from to_timedelta --- pandas/core/tools/timedeltas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/tools/timedeltas.py b/pandas/core/tools/timedeltas.py index 48f30acf269da..51b404b46f321 100644 --- a/pandas/core/tools/timedeltas.py +++ b/pandas/core/tools/timedeltas.py @@ -28,8 +28,8 @@ def to_timedelta(arg, unit="ns", errors="raise"): The data to be converted to timedelta. unit : str, default 'ns' Denotes the unit of the arg. Possible values: - ('Y', 'M', 'W', 'D', 'days', 'day', 'hours', hour', 'hr', - 'h', 'm', 'minute', 'min', 'minutes', 'T', 'S', 'seconds', + ('W', 'D', 'days', 'day', 'hours', hour', 'hr', 'h', + 'm', 'minute', 'min', 'minutes', 'T', 'S', 'seconds', 'sec', 'second', 'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'L', 'us', 'microseconds', 'microsecond', 'micro', 'micros', 'U', 'ns', 'nanoseconds', 'nano', 'nanos',