问题
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