Skip to content

Commit 6afb9ee

Browse files
committed
DOC: More infer_freq related tweaks
1 parent 6d98bc9 commit 6afb9ee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/source/api.rst

+1
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,7 @@ Components
14161416
TimedeltaIndex.microseconds
14171417
TimedeltaIndex.nanoseconds
14181418
TimedeltaIndex.components
1419+
TimedeltaIndex.inferred_freq
14191420

14201421
Conversion
14211422
~~~~~~~~~~

pandas/tseries/frequencies.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,11 @@ def _period_str_to_code(freqstr):
671671
def infer_freq(index, warn=True):
672672
"""
673673
Infer the most likely frequency given the input index. If the frequency is
674-
uncertain, a warning will be printed
674+
uncertain, a warning will be printed.
675675
676676
Parameters
677677
----------
678-
index : DatetimeIndex
678+
index : DatetimeIndex or TimedeltaIndex
679679
if passed a Series will use the values of the series (NOT THE INDEX)
680680
warn : boolean, default True
681681
@@ -684,6 +684,7 @@ def infer_freq(index, warn=True):
684684
freq : string or None
685685
None if no discernible frequency
686686
TypeError if the index is not datetime-like
687+
ValueError if there are less than three values.
687688
"""
688689
import pandas as pd
689690

0 commit comments

Comments
 (0)