Pandas“Freq”标签上的文件在哪里?

2024-05-03 05:14:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我是熊猫的新手,正在尝试使用date_range。我遇到了freq的各种好东西,比如BMEBMS,我希望能够快速查找合适的字符串来得到我想要的。昨天我在文档中的某个地方找到了一个格式很好的表,但是这个表的标题太钝了,我今天无法使用search再次找到它。


Tags: 字符串文档标题searchdate格式地方range
1条回答
网友
1楼 · 发布于 2024-05-03 05:14:37

您可以找到名为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).

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

但以后会更好:

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

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

相关问题 更多 >