我使用 Rust Polars,发现使用它有点困难,因为不太清楚如何显示所有列。
use polars::df;
// use macro
let df = df! [
"Column A 12345678910" => ["a", "b", "c"],
"Column B 12345678910" => [1, 2, 3],
"Column C 12345678910" => [Some(1), None, Some(3)],
"Column D 12345678910" => [Some(1), None, Some(3)],
"Column E 12345678910" => [Some(1), None, Some(3)],
"Column F 12345678910" => [1, 2, 3],
"Column G 12345678910" => [1, 2, 3],
"Column Z 12345678910" => [1, 2, 3],
"Column Ex 12345678910" => [Some(1), None, Some(3)],
"Column Fs 12345678910" => [1, 2, 3],
"Column Ga 12345678910" => [1, 2, 3],
"Column Zz 12345678910" => [1, 2, 3],
]?;
println!("{:?}", df);
输出
shape: (3, 12)
+----------------------+----------------------+----------------------+----------------------+-----+-----------------------+-----------------------+-----------------------+-----------------------+
| Column A 12345678910 | Column B 12345678910 | Column C 12345678910 | Column D 12345678910 | ... | Column Ex 12345678910 | Column Fs 12345678910 | Column Ga 12345678910 | Column Zz 12345678910 |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| str | i32 | i32 | i32 | | i32 | i32 | i32 | i32 |
+======================+======================+======================+======================+=====+=======================+=======================+=======================+=======================+
| a | 1 | 1 | 1 | ... | 1 | 1 | 1 | 1 |
+----------------------+----------------------+----------------------+----------------------+-----+-----------------------+-----------------------+-----------------------+-----------------------+
| b | 2 | null | null | ... | null | 2 | 2 | 2 |
+----------------------+----------------------+----------------------+----------------------+-----+-----------------------+-----------------------+-----------------------+-----------------------+
| c | 3 | 3 | 3 | ... | 3 | 3 | 3 | 3 |
+----------------------+----------------------+----------------------+----------------------+-----+-----------------------+-----------------------+-----------------------+-----------------------+
是否可以显示所有带有生锈极性的列?