MCPcopy Create free account
hub / github.com/apache/datafusion / show_limit

Method show_limit

datafusion/core/src/dataframe/mod.rs:1551–1554  ·  view source on GitHub ↗

Execute the `DataFrame` and print only the first `num` rows of the result to the console. # Example ``` # use datafusion::prelude::*; # use datafusion::error::Result; # #[tokio::main] # async fn main() -> Result<()> { let ctx = SessionContext::new(); let df = ctx .read_csv("tests/data/example.csv", CsvReadOptions::new()) .await?; df.show_limit(10).await?; # Ok(()) # } ```

(self, num: usize)

Source from the content-addressed store, hash-verified

1549 /// # }
1550 /// ```
1551 pub async fn show_limit(self, num: usize) -> Result<()> {
1552 let results = self.limit(0, Some(num))?.collect().await?;
1553 Ok(pretty::print_batches(&results)?)
1554 }
1555
1556 /// Return a new [`TaskContext`] which would be used to execute this DataFrame
1557 pub fn task_ctx(&self) -> TaskContext {

Callers 2

dataframe_to_s3Function · 0.80
row_writer_resize_testFunction · 0.80

Calls 2

collectMethod · 0.80
limitMethod · 0.45

Tested by 1

row_writer_resize_testFunction · 0.64