pandas date_range freq 参数的详细描述。

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) 半月结束频率(15日和月末)
BM business month end frequency 营业月结束频率
CBM custom business month end frequency 自定义营业月结束频率
MS month start frequency 月开始频率
SMS semi-month start frequency (1st and 15th) 半月开始频率(第1天和第15天)
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 纳秒

IN:pd.date_range(start='2018-1-1',periods=10,freq='s')
OUT:DatetimeIndex(['2018-01-01 00:00:00', '2018-01-01 00:00:01',
               '2018-01-01 00:00:02', '2018-01-01 00:00:03',
               '2018-01-01 00:00:04', '2018-01-01 00:00:05',
               '2018-01-01 00:00:06', '2018-01-01 00:00:07',
               '2018-01-01 00:00:08', '2018-01-01 00:00:09'],
              dtype='datetime64[ns]', freq='S')
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值