Skip to content

Commit 323c6e1

Browse files
committed
UNPICK remove rs fix
1 parent 4ba4a14 commit 323c6e1

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/dataframe.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -998,13 +998,10 @@ impl PyDataFrame {
998998
fn print_dataframe(py: Python, df: DataFrame) -> PyDataFusionResult<()> {
999999
// Get string representation of record batches
10001000
let batches = wait_for_future(py, df.collect())??;
1001-
let result = if batches.is_empty() {
1002-
"DataFrame has no rows".to_string()
1003-
} else {
1004-
match pretty::pretty_format_batches(&batches) {
1005-
Ok(batch) => format!("DataFrame()\n{batch}"),
1006-
Err(err) => format!("Error: {:?}", err.to_string()),
1007-
}
1001+
let batches_as_string = pretty::pretty_format_batches(&batches);
1002+
let result = match batches_as_string {
1003+
Ok(batch) => format!("DataFrame()\n{batch}"),
1004+
Err(err) => format!("Error: {:?}", err.to_string()),
10081005
};
10091006

10101007
// Import the Python 'builtins' module to access the print function

0 commit comments

Comments
 (0)