How to read all columns as string with polars at rust? That's my code
let df = CsvReader::from_path(filecsv)?.has_header(true).finish()?; Ok(df)
It read some data as int64, but I want to read all columns (whenever they're calls) as string. How can I do it?
If you want all columns to be strings, you can simply use
infer_schema(Some(0))
. This will use 0 rows to infer the schema, which results in all columns being “inferred” as strings (the default, most general type).For
LazyCsvReader
the corresponding method would bewith_infer_schema_length
.