Pandas 'Freq' 标签中哪些值有效?
What values are valid in Pandas 'Freq' tags?
我是 Pandas 的新手,正在尝试使用 date_range
。我遇到了 freq
的各种好东西,比如 BME
和 BMS
,我希望能够快速查找合适的字符串以获得我想要的。昨天我在文档的某处找到了一个格式很好的 table,但是 table 的标题太过晦涩以至于我今天无法使用搜索再次找到它。
哪些值在 Pandas 'Freq' 标签中有效?
你可以找到它 Offset Aliases:
A number of string aliases are given to useful common time series frequencies. We will refer to these aliases as offset aliases.
Alias Description
B business day frequency
C custom business day frequency
D calendar day frequency
W weekly frequency
M month end frequency
SM semi-month end frequency (15th and end of month)
BM business month end frequency
CBM custom business month end frequency
MS month start frequency
SMS semi-month start frequency (1st and 15th)
BMS business month start frequency
CBMS custom business month start frequency
Q quarter end frequency
BQ business quarter end frequency
QS quarter start frequency
BQS business quarter start frequency
A, Y year end frequency
BA, BY business year end frequency
AS, YS year start frequency
BAS, BYS business year start frequency
BH business hour frequency
H hourly frequency
T, min minutely frequency
S secondly frequency
L, ms milliseconds
U, us microseconds
N nanoseconds
我是 Pandas 的新手,正在尝试使用 date_range
。我遇到了 freq
的各种好东西,比如 BME
和 BMS
,我希望能够快速查找合适的字符串以获得我想要的。昨天我在文档的某处找到了一个格式很好的 table,但是 table 的标题太过晦涩以至于我今天无法使用搜索再次找到它。
哪些值在 Pandas 'Freq' 标签中有效?
你可以找到它 Offset Aliases:
A number of string aliases are given to useful common time series frequencies. We will refer to these aliases as offset aliases.
Alias Description
B business day frequency
C custom business day frequency
D calendar day frequency
W weekly frequency
M month end frequency
SM semi-month end frequency (15th and end of month)
BM business month end frequency
CBM custom business month end frequency
MS month start frequency
SMS semi-month start frequency (1st and 15th)
BMS business month start frequency
CBMS custom business month start frequency
Q quarter end frequency
BQ business quarter end frequency
QS quarter start frequency
BQS business quarter start frequency
A, Y year end frequency
BA, BY business year end frequency
AS, YS year start frequency
BAS, BYS business year start frequency
BH business hour frequency
H hourly frequency
T, min minutely frequency
S secondly frequency
L, ms milliseconds
U, us microseconds
N nanoseconds