我正在尝试使用date_range
。我发现了一些有效的值freq
, like BME
and BMS
我希望能够快速查找正确的字符串以获得我想要的东西。
Pandas“Freq”标签中哪些值有效?
你可以找到它叫偏移别名 https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)