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

Method read_csv

datafusion/core/src/execution/context/csv.rs:53–59  ·  view source on GitHub ↗

Creates a [`DataFrame`] for reading a CSV data source. For more control such as reading multiple files, you can use [`read_table`](Self::read_table) with a [`super::ListingTable`]. Example usage is given below: ``` use datafusion::prelude::*; # use datafusion::error::Result; # #[tokio::main] # async fn main() -> Result<()> { let ctx = SessionContext::new(); // You can read a single file using `

(
        &self,
        table_paths: P,
        options: CsvReadOptions<'_>,
    )

Source from the content-addressed store, hash-verified

51 /// # }
52 /// ```
53 pub async fn read_csv<P: DataFilePaths>(
54 &self,
55 table_paths: P,
56 options: CsvReadOptions<'_>,
57 ) -> Result<DataFrame> {
58 self._read_type(table_paths, options).await
59 }
60
61 /// Registers a CSV file as a table which can referenced from SQL
62 /// statements executed against this context.

Callers 15

write_csv_to_parquetFunction · 0.80
read_csvFunction · 0.80
in_memory_object_storeFunction · 0.80
load_csvFunction · 0.80
test_csv_scan_with_nameFunction · 0.80
test_csv_scanFunction · 0.80
query_compress_csvFunction · 0.80
test_csv_serializerFunction · 0.80

Calls 1

_read_typeMethod · 0.80