pub trait RepeatBy {
    fn repeat_by(&self, _by: &IdxCa) -> ListChunked { ... }
}
Available on crate feature repeat_by only.
Expand description

Repeat the values n times.

Provided Methods§

Repeat the values n times, where n is determined by the values in by.

Examples found in repository?
src/series/implementations/boolean.rs (line 383)
382
383
384
    fn repeat_by(&self, by: &IdxCa) -> ListChunked {
        RepeatBy::repeat_by(&self.0, by)
    }
More examples
Hide additional examples
src/series/implementations/utf8.rs (line 337)
336
337
338
    fn repeat_by(&self, by: &IdxCa) -> ListChunked {
        RepeatBy::repeat_by(&self.0, by)
    }
src/series/implementations/categorical.rs (line 399)
398
399
400
401
402
403
404
    fn repeat_by(&self, by: &IdxCa) -> ListChunked {
        let out = self.0.logical().repeat_by(by);
        let casted = out
            .cast(&DataType::List(Box::new(self.dtype().clone())))
            .unwrap();
        casted.list().unwrap().clone()
    }

Implementors§