readCsv method
- String path, {
- bool hasHeader = true,
- String separator = ',',
- int? skipRows,
- int? nRows,
- bool tryParseDates = false,
- ExecutionOptions options = const ExecutionOptions(),
Reads a CSV file eagerly by collecting a lazy CSV scan.
Implementation
Future<DataFrame> readCsv(
String path, {
bool hasHeader = true,
String separator = ',',
int? skipRows,
int? nRows,
bool tryParseDates = false,
ExecutionOptions options = const ExecutionOptions(),
}) async {
final input = scanCsv(
path,
hasHeader: hasHeader,
separator: separator,
skipRows: skipRows,
nRows: nRows,
tryParseDates: tryParseDates,
);
try {
return await input.collect(options: options);
} finally {
input.close();
}
}