Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pandas
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Birhanu Belay
pandas
Commits
45f27c81
Unverified
Commit
45f27c81
authored
6 months ago
by
Tuhin Sharma
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
DOC: fix SA01,ES01 for pandas.infer_freq (#60441)
parent
bf846d30
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci/code_checks.sh
+0
-1
0 additions, 1 deletion
ci/code_checks.sh
pandas/tseries/frequencies.py
+12
-0
12 additions, 0 deletions
pandas/tseries/frequencies.py
with
12 additions
and
1 deletion
ci/code_checks.sh
+
0
−
1
View file @
45f27c81
...
@@ -109,7 +109,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
...
@@ -109,7 +109,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i
"pandas.errors.PerformanceWarning SA01"
\
-i
"pandas.errors.PerformanceWarning SA01"
\
-i
"pandas.errors.UndefinedVariableError PR01,SA01"
\
-i
"pandas.errors.UndefinedVariableError PR01,SA01"
\
-i
"pandas.errors.ValueLabelTypeMismatch SA01"
\
-i
"pandas.errors.ValueLabelTypeMismatch SA01"
\
-i
"pandas.infer_freq SA01"
\
-i
"pandas.io.json.build_table_schema PR07,RT03,SA01"
\
-i
"pandas.io.json.build_table_schema PR07,RT03,SA01"
\
-i
"pandas.plotting.andrews_curves RT03,SA01"
\
-i
"pandas.plotting.andrews_curves RT03,SA01"
\
-i
"pandas.plotting.scatter_matrix PR07,SA01"
\
-i
"pandas.plotting.scatter_matrix PR07,SA01"
\
...
...
This diff is collapsed.
Click to expand it.
pandas/tseries/frequencies.py
+
12
−
0
View file @
45f27c81
...
@@ -89,6 +89,11 @@ def infer_freq(
...
@@ -89,6 +89,11 @@ def infer_freq(
"""
"""
Infer the most likely frequency given the input index.
Infer the most likely frequency given the input index.
This method attempts to deduce the most probable frequency (e.g.,
'
D
'
for daily,
'
H
'
for hourly) from a sequence of datetime-like objects. It is particularly useful
when the frequency of a time series is not explicitly set or known but can be
inferred from its values.
Parameters
Parameters
----------
----------
index : DatetimeIndex, TimedeltaIndex, Series or array-like
index : DatetimeIndex, TimedeltaIndex, Series or array-like
...
@@ -106,6 +111,13 @@ def infer_freq(
...
@@ -106,6 +111,13 @@ def infer_freq(
ValueError
ValueError
If there are fewer than three values.
If there are fewer than three values.
See Also
--------
date_range : Return a fixed frequency DatetimeIndex.
timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
period_range : Return a fixed frequency PeriodIndex.
DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
Examples
Examples
--------
--------
>>>
idx
=
pd
.
date_range
(
start
=
"
2020/12/01
"
,
end
=
"
2020/12/30
"
,
periods
=
30
)
>>>
idx
=
pd
.
date_range
(
start
=
"
2020/12/01
"
,
end
=
"
2020/12/30
"
,
periods
=
30
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment