File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
109
109
-i " pandas.errors.PerformanceWarning SA01" \
110
110
-i " pandas.errors.UndefinedVariableError PR01,SA01" \
111
111
-i " pandas.errors.ValueLabelTypeMismatch SA01" \
112
- -i " pandas.infer_freq SA01" \
113
112
-i " pandas.io.json.build_table_schema PR07,RT03,SA01" \
114
113
-i " pandas.plotting.andrews_curves RT03,SA01" \
115
114
-i " pandas.plotting.scatter_matrix PR07,SA01" \
Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ def infer_freq(
89
89
"""
90
90
Infer the most likely frequency given the input index.
91
91
92
+ This method attempts to deduce the most probable frequency (e.g., 'D' for daily,
93
+ 'H' for hourly) from a sequence of datetime-like objects. It is particularly useful
94
+ when the frequency of a time series is not explicitly set or known but can be
95
+ inferred from its values.
96
+
92
97
Parameters
93
98
----------
94
99
index : DatetimeIndex, TimedeltaIndex, Series or array-like
@@ -106,6 +111,13 @@ def infer_freq(
106
111
ValueError
107
112
If there are fewer than three values.
108
113
114
+ See Also
115
+ --------
116
+ date_range : Return a fixed frequency DatetimeIndex.
117
+ timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
118
+ period_range : Return a fixed frequency PeriodIndex.
119
+ DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
120
+
109
121
Examples
110
122
--------
111
123
>>> idx = pd.date_range(start="2020/12/01", end="2020/12/30", periods=30)
You can’t perform that action at this time.
0 commit comments