Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
reswqa committed Apr 15, 2024
1 parent 84f6876 commit 62387c4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions crates/polars-core/src/frame/group_by/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,14 @@ impl DataFrame {
.cloned()
.collect::<Vec<_>>();
if by.is_empty() {
Ok(if self.height() == 0 {
GroupsProxy::Slice {
groups: vec![],
rolling: false,
}
let groups = if self.height() == 0 {
vec![]
} else {
GroupsProxy::Slice {
groups: vec![[0, self.height() as IdxSize]],
rolling: false,
}
vec![[0, self.height() as IdxSize]]
};
Ok(GroupsProxy::Slice {
groups,
rolling: false,
})
} else {
let rows = if multithreaded {
Expand Down

0 comments on commit 62387c4

Please sign in to comment.