Function pretty_format_batches_with_options
pub fn pretty_format_batches_with_options(
results: &[RecordBatch],
options: &FormatOptions<'_>,
) -> Result<impl Display, ArrowError>
Expand description
Create a visual representation of RecordBatch
es with formatting options.
§Arguments
results
- A slice of record batches to displayoptions
-FormatOptions
that control the resulting display
§Example
let options = FormatOptions::new()
.with_null("<NULL>");
// Note, returned object implements `Display`
let pretty_table = pretty_format_batches_with_options(&[batch], &options).unwrap();
let table_str = format!("Batches:\n{pretty_table}");
assert_eq!(table_str,
r#"Batches:
+---+--------+
| a | b |
+---+--------+
| 1 | a |
| 2 | <NULL> |
+---+--------+"#);