We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eb4fb7 commit e798a86Copy full SHA for e798a86
crates/polars-core/src/fmt.rs
@@ -747,8 +747,12 @@ impl Display for DataFrame {
747
str_truncate + ellipsis_len + padding,
748
std::cmp::max(name_lengths[idx], *elem_len),
749
);
750
- if mx <= min_col_width {
+ if (mx <= min_col_width) && !(max_n_rows > 0 && height > max_n_rows) {
751
+ // col width is less than min width + table is not truncated
752
constraints.push(col_width_exact(mx));
753
+ } else if mx <= min_col_width {
754
+ // col width is less than min width + table is truncated (w/ ellipsis)
755
+ constraints.push(col_width_bounds(mx, min_col_width));
756
} else {
757
constraints.push(col_width_bounds(min_col_width, mx));
758
}
0 commit comments