From 25e2f8687f0a7033ddbbd6aa1b833d0586f99bad Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Thu, 12 Mar 2020 16:19:22 -0700 Subject: [PATCH] fix infer_freq raises section (#32642) * fix infer_freq raises section * edits * another period --- pandas/tseries/frequencies.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index 4af516af8a28e..2477ff29fbfd5 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -249,9 +249,14 @@ def infer_freq(index, warn: bool = True) -> Optional[str]: Returns ------- str or None - None if no discernible frequency - TypeError if the index is not datetime-like - ValueError if there are less than three values. + None if no discernible frequency. + + Raises + ------ + TypeError + If the index is not datetime-like. + ValueError + If there are fewer than three values. """ import pandas as pd