File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ Top-level dealing with datetimelike
158158 bdate_range
159159 period_range
160160 timedelta_range
161+ infer_freq
161162
162163Top-level evaluation
163164~~~~~~~~~~~~~~~~~~~~
@@ -1364,6 +1365,7 @@ Time/Date Components
13641365 DatetimeIndex.is_quarter_end
13651366 DatetimeIndex.is_year_start
13661367 DatetimeIndex.is_year_end
1368+ DatetimeIndex.inferred_freq
13671369
13681370Selecting
13691371~~~~~~~~~
@@ -1414,6 +1416,7 @@ Components
14141416 TimedeltaIndex.microseconds
14151417 TimedeltaIndex.nanoseconds
14161418 TimedeltaIndex.components
1419+ TimedeltaIndex.inferred_freq
14171420
14181421Conversion
14191422~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ def freqstr(self):
7979
8080 @cache_readonly
8181 def inferred_freq (self ):
82+ """
83+ Trys to return a string representing a frequency guess,
84+ generated by infer_freq. Returns None if it can't autodetect the
85+ frequency.
86+ """
8287 try :
8388 return infer_freq (self )
8489 except ValueError :
Original file line number Diff line number Diff line change @@ -671,11 +671,11 @@ def _period_str_to_code(freqstr):
671671def 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
You can’t perform that action at this time.
0 commit comments