Where is the documentation on Pandas 'Freq' tags? [closed]

∥☆過路亽.° 提交于 2019-12-28 04:45:50

问题


I am new to Pandas, and am trying to use date_range. I came across all kinds of good things for freq, like BME and BMS and 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.


回答1:


You can find it called 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

But later it can be better:

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

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



来源:https://stackoverflow.com/questions/35339139/where-is-the-documentation-on-pandas-freq-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!