From 3d277d2535259f1136962aabf9242b2016395c90 Mon Sep 17 00:00:00 2001 From: Mayank Anand Date: Fri, 17 Dec 2021 22:21:25 +0000 Subject: [PATCH] updated pandas reference link, frquency alias conditions --- python/cudf/cudf/_lib/datetime.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/cudf/cudf/_lib/datetime.pyx b/python/cudf/cudf/_lib/datetime.pyx index 6618ed37154..e41016645cd 100644 --- a/python/cudf/cudf/_lib/datetime.pyx +++ b/python/cudf/cudf/_lib/datetime.pyx @@ -65,18 +65,18 @@ def extract_datetime_component(Column col, object field): cdef libcudf_datetime.rounding_frequency _get_rounding_frequency(object freq): cdef libcudf_datetime.rounding_frequency freq_val - # https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Timedelta.resolution.html + # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timedelta.resolution_string.html if freq == "D": freq_val = libcudf_datetime.rounding_frequency.DAY elif freq == "H": freq_val = libcudf_datetime.rounding_frequency.HOUR - elif freq == "T" or freq == "min": + elif freq in ("T", "min"): freq_val = libcudf_datetime.rounding_frequency.MINUTE elif freq == "S": freq_val = libcudf_datetime.rounding_frequency.SECOND - elif freq == "L" or freq == "ms": + elif freq in ("L", "ms"): freq_val = libcudf_datetime.rounding_frequency.MILLISECOND - elif freq == "U" or freq == "us": + elif freq in ("U", "us"): freq_val = libcudf_datetime.rounding_frequency.MICROSECOND elif freq == "N": freq_val = libcudf_datetime.rounding_frequency.NANOSECOND