groupby_dynamic like方法支持区间索引
groupby_dynamic like method to support the interval index
有点像
#[derive(Clone, Debug)]
pub struct IntervalGroupOptions {
pub index_column: String,
/// start a window at this interval
pub every: i32,
/// window duration
pub period: i32,
/// offset window boundaries
pub offset: i32,
/// truncate the time column values to the window
pub truncate: bool,
// add the boundaries to the dataframe
pub include_boundaries: bool,
pub closed_window: ClosedWindow,
}
--> 获取组元组和边界作为索引
更新于 https://github.com/pola-rs/polars/commit/f800a6418d90568798d92603237707dbe68c19bc
目前可以使用
.groupby_dynamic(
vec![],
DynamicGroupOptions {
index_column: "index".to_string(),
every: Duration::parse("48i"),
period: Duration::parse("240i"),
offset: Duration::parse("0i"),
truncate: false,
include_boundaries: true,
closed_window: ClosedWindow::Left,
},
)
.agg([.........]).collect()
有点像
#[derive(Clone, Debug)]
pub struct IntervalGroupOptions {
pub index_column: String,
/// start a window at this interval
pub every: i32,
/// window duration
pub period: i32,
/// offset window boundaries
pub offset: i32,
/// truncate the time column values to the window
pub truncate: bool,
// add the boundaries to the dataframe
pub include_boundaries: bool,
pub closed_window: ClosedWindow,
}
--> 获取组元组和边界作为索引
更新于 https://github.com/pola-rs/polars/commit/f800a6418d90568798d92603237707dbe68c19bc
目前可以使用
.groupby_dynamic(
vec![],
DynamicGroupOptions {
index_column: "index".to_string(),
every: Duration::parse("48i"),
period: Duration::parse("240i"),
offset: Duration::parse("0i"),
truncate: false,
include_boundaries: true,
closed_window: ClosedWindow::Left,
},
)
.agg([.........]).collect()