-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pl.Config.show_full
(or something similar)
#16587
Comments
Just on the point of printing larger lists, it reminds me of the request for an equivalent to pandas import polars as pl
import pandas as pd
df = pl.DataFrame({
"A": [ list(range(20)) for _ in range(5) ],
"B": range(5),
"C": [ "foo" * 20 for _ in range(5) ]
})
with pd.option_context(
"display.expand_frame_repr", True,
"display.max_columns", None,
"display.max_rows", None,
"display.max_colwidth", None,
):
print(df.to_pandas()) A B \
0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 0
1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 1
2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 2
3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 3
4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 4
C
0 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
1 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
2 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
3 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
4 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
df.glimpse(max_items_per_column=-1) Rows: 5
Columns: 3
$ A <list[i64]> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
$ B <i64> 0, 1, 2, 3
$ C <str> 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo' |
It would be awesome if both Rust and Python had a way of simply printing everything. I'd take Even if it's extremely poor performance - I think it goes without saying this feature is only for desperate debugging |
Description
Sometimes you may want to simply print an entire table, and see everything, with no truncation anywhere. Sometimes you may want the string representation of the full table, no matter how big it is.
Right now, we can manually set the
fmt_str_lengths
to 999999 andtbl_rows
/tbl_cols
to 99999, but I always have to go back to the API to look up what the actual names are, since some words like "fmt" and "str" are abbreviated but others like "lengths" are not. It would be very nice to have a single configuration option to print the full table.This does open the door for floating point questions and really long lists, so some feedback on this idea would be welcome.
The text was updated successfully, but these errors were encountered: