Function read_csv

Source
pub fn read_csv<P: AsRef<Path>>(
    file_path: P,
    has_header: bool,
    delimiter: char,
) -> PolarsResult<DataFrame>
Expand description

Read a CSV file into a DataFrame

§Arguments

  • file_path - Path to the CSV file
  • has_header - Whether the CSV file has a header row
  • delimiter - The delimiter character (default: ‘,’)

§Returns

Returns a PolarsResult containing the data if successful

§Example

use ta_lib_in_rust::util::file_utils::read_csv;

let df = read_csv("data/prices.csv", true, ',').unwrap();
println!("{:?}", df);