哪些值在 Pandas 的“Freq"标签中有效? [英] What values are valid in Pandas 'Freq' tags?

查看:73
本文介绍了哪些值在 Pandas 的“Freq"标签中有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Pandas 的新手,正在尝试使用 date_range.我遇到了 freq 的各种好东西,比如 BMEBMS,我希望能够快速查找正确的字符串得到我想要的.昨天我在文档的某个地方找到了一个格式很好的表格,但是表格的标题太晦涩了,我今天无法使用搜索再次找到它.

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.

哪些值在 Pandas 的Freq"标签中有效?

What values are valid in Pandas 'Freq' tags?

推荐答案

你可以找到它叫做 偏移别名:

为有用的常见时间序列频率提供了许多字符串别名.我们将这些别名称为偏移别名.

A number of string aliases are given to useful common time series frequencies. We will refer to these aliases as 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

这篇关于哪些值在 Pandas 的“Freq"标签中有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆