pub trait IntoGroupsProxy {
    fn group_tuples(
        &self,
        _multithreaded: bool,
        _sorted: bool
    ) -> PolarsResult<GroupsProxy> { ... } }
Expand description

Used to create the tuples for a groupby operation.

Provided Methods§

Create the tuples need for a groupby operation. * The first value in the tuple is the first index of the group. * The second value in the tuple is are the indexes of the groups including the first value.

Examples found in repository?
src/series/implementations/categorical.rs (line 139)
138
139
140
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        self.0.logical().group_tuples(multithreaded, sorted)
    }
More examples
Hide additional examples
src/series/implementations/boolean.rs (line 99)
98
99
100
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        IntoGroupsProxy::group_tuples(&self.0, multithreaded, sorted)
    }
src/series/implementations/list.rs (line 46)
45
46
47
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        IntoGroupsProxy::group_tuples(&self.0, multithreaded, sorted)
    }
src/series/implementations/object.rs (line 57)
56
57
58
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        IntoGroupsProxy::group_tuples(&self.0, multithreaded, sorted)
    }
src/series/implementations/utf8.rs (line 96)
95
96
97
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        IntoGroupsProxy::group_tuples(&self.0, multithreaded, sorted)
    }
src/frame/groupby/into_groups.rs (line 237)
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    fn group_tuples(&self, multithreaded: bool, sorted: bool) -> PolarsResult<GroupsProxy> {
        #[cfg(feature = "performant")]
        {
            let ca = self.cast(&DataType::UInt8).unwrap();
            let ca = ca.u8().unwrap();
            ca.group_tuples(multithreaded, sorted)
        }
        #[cfg(not(feature = "performant"))]
        {
            let ca = self.cast(&DataType::UInt32).unwrap();
            let ca = ca.u32().unwrap();
            ca.group_tuples(multithreaded, sorted)
        }
    }

Implementors§