From 96c86c2f7f4f0dec8a9a9e7725d7ec40c613c0b1 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 11 Mar 2020 16:36:45 -0700 Subject: [PATCH 1/3] fix infer_freq raises section --- pandas/tseries/frequencies.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index 4af516af8a28e..dedc4e4f1b6c7 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -250,8 +250,13 @@ def infer_freq(index, warn: bool = True) -> Optional[str]: ------- str or None None if no discernible frequency - TypeError if the index is not datetime-like - ValueError if there are less than three values. + + Raises + ------ + TypeError + If the index is not datetime-like + ValueError + If there are less than three values. """ import pandas as pd From 18695dcd1895411ba8bcd8d184abcbb682ccde29 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Wed, 11 Mar 2020 18:32:53 -0700 Subject: [PATCH 2/3] edits --- pandas/tseries/frequencies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index dedc4e4f1b6c7..b7b947d5ff049 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -254,9 +254,9 @@ def infer_freq(index, warn: bool = True) -> Optional[str]: Raises ------ TypeError - If the index is not datetime-like + If the index is not datetime-like. ValueError - If there are less than three values. + If there are fewer than three values. """ import pandas as pd From 44fcc1494468b73d6585265d336a01f7f5ae406c Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Thu, 12 Mar 2020 11:48:50 -0700 Subject: [PATCH 3/3] another period --- pandas/tseries/frequencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index b7b947d5ff049..2477ff29fbfd5 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -249,7 +249,7 @@ def infer_freq(index, warn: bool = True) -> Optional[str]: Returns ------- str or None - None if no discernible frequency + None if no discernible frequency. Raises ------