readCsvSync 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
DataFrame readCsvSync(
String path, {
bool hasHeader = true,
String separator = ',',
int? skipRows,
int? nRows,
bool tryParseDates = false,
ExecutionOptions options = const ExecutionOptions(),
}) {
final input = scanCsv(
path,
hasHeader: hasHeader,
separator: separator,
skipRows: skipRows,
nRows: nRows,
tryParseDates: tryParseDates,
);
try {
return input.collectSync(options: options);
} finally {
input.close();
}
}