1
    let gaf_df = LazyCsvReader::new(file_path.clone())
        .with_has_header(false)
        .with_separator(b'\t')
        .finish()?;
    let gaf_df_select = gaf_df
        .select([
            col("column_1").alias("read_id"),
            col("column_2").alias("length"),
            col("column_6").alias("path"),
            col("column_12").alias("mapq")
        ])
        .collect()?;

This is my code. I found the number of threads can be set for CsvReadOptions with with_n_threads, but I don't know how to set the number of threads for LazyCsvReader. I can't set with_n_threads for LazyCsvReader.

1
  • 2
    I'm not familiar with this crate but after some investigation it seems that support for this may not be implemented. If that does turn out to be the case, you could consider sending a pull request to add a LazyCsvReader::with_n_threads method, similar in spirit to this pull request. Commented Apr 17 at 11:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.