date_range

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.date_range.html#pandas.date_range

pandas.date_range(start=None, end=None, periods=None, freq='D', tz=None, normalize=False, name=None, closed=None, **kwargs)

参数

参数描述
start : string or datetime-like, default None
end : string or datetime-like, default None
periods : integer or None, default None生成时间段的size,要指定开始时间或者结束时间
freq : string or DateOffset, default ‘D’ (calendar daily)生成时间的间隔,默认是天
tz : string or NoneTime zone name for returning localized DatetimeIndex, for example Asia/Hong_Kong
normalize : bool, default FalseNormalize start/end dates to midnight before generating date range
name : str, default NoneName of the resulting index
closed : string or None, default NoneMake the interval closed with respect to the given frequency to the ‘left’, ‘right’, or both sides (None)

freq参数选项

简称Description描述
Bbusiness day frequency工作日
Ccustom business day frequency (experimental)
Dcalendar day frequency日历日
Wweekly frequency
Mmonth end frequency
SMsemi-month end frequency (15th and end of month)
BMbusiness month end frequency
CBMcustom business month end frequency
MSmonth start frequency
SMSsemi-month start frequency (1st and 15th)
BMSbusiness month start frequency
CBMScustom business month start frequency
Qquarter end frequency
BQbusiness quarter endfrequency
QSquarter start frequency
BQSbusiness quarter start frequency
Ayear end frequency
BAbusiness year end frequency
ASyear start frequency
BASbusiness year start frequency
BHbusiness hour frequency
Hhourly frequency
T, minminutely frequency
Ssecondly frequency
L, msmilliseconds
U, usmicroseconds
Nnanoseconds

返回值

rng : DatetimeIndex

其他

bdate_range([start, end, periods, freq, tz, …])工作日序列生成快捷函数
period_range([start, end, periods, freq, name])范围序列生成快捷函数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值