Python 关于 Pandas 'Freq' 标签的文档在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35339139/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 16:19:20  来源:igfitidea点击:

Where is the documentation on Pandas 'Freq' tags?

pythonpandasdocumentationdataframefrequency

提问by sundowner

I am new to Pandas, and am trying to use date_range. I came across all kinds of good things for freq, like BMEand BMSand I would like to be able to quickly look up the proper strings to get what I want. Yesterday I found a nicely formatted table somewhere in the documentation, but the title of the table was so obtuse that I can not use search to find it again today.

我是 Pandas 的新手,正在尝试使用date_range. 我遇到了各种各样的好东西freq,比如BMEBMS,我希望能够快速查找正确的字符串来获得我想要的东西。昨天我在文档的某处找到了一个格式很好的表格,但是表格的标题太钝了,我今天无法使用搜索再次找到它。

采纳答案by jezrael

You can find it called Offset Aliases:

你可以找到它叫做Offset Aliases

A number of string aliases are given to useful common time series frequencies. We will refer to these aliases as offset aliases (referred to as time rules prior to v0.8.0).

为有用的常见时间序列频率提供了许多字符串别名。我们将这些别名称为偏移别名(在 v0.8.0 之前称为时间规则)。

Alias   Description
B       business day frequency
C       custom business day frequency (experimental)
D       calendar day frequency
W       weekly frequency
M       month end frequency
BM      business month end frequency
CBM     custom business month end frequency
MS      month start frequency
BMS     business month start frequency
CBMS    custom business month start frequency
Q       quarter end frequency
BQ      business quarter endfrequency
QS      quarter start frequency
BQS     business quarter start frequency
A       year end frequency
BA      business year end frequency
AS      year start frequency
BAS     business year start frequency
BH      business hour frequency
H       hourly frequency
T, min  minutely frequency
S       secondly frequency
L, ms   milliseonds
U, us   microseconds
N       nanoseconds

But later it can be better:

但以后可能会更好:

DOC: more complete docs on offsets/frequencies needed #8438

DOC:需要更多关于偏移/频率的完整文档 #8438

DOC: in docstrings point users to valid offset aliases #3324

DOC:在文档字符串中将用户指向有效的偏移别名 #3324