grizzly_io 3.0.1 grizzly_io: ^3.0.1 copied to clipboard
Readers and writers for several file formats (CSV, TSV, JSON, YAML, etc)
// Copyright (c) 2017, teja. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.
// import 'package:grizzly_io/src/csv/parser/parser.dart';
import 'package:grizzly_io/io_loader.dart';
Future<void> main() async {
/*
String fs = r',';
String ts = r"'";
String input = """Name,Age,'House
(H)'""";
List<String> cols = CsvParser.parseRow(input, fs: fs, ts: ts);
if (cols == null) {
print(null);
} else {
cols.forEach(print);
}
*/
Table tsv = await readLTsv('data/labeled_tsv/headers/tab_in_label.tsv');
print(tsv);
final out = encodeCsv(tsv.toList(), fieldSep: '\t');
print(out);
tsv = parseLTsv(out);
print(tsv);
print(tsv.columnAsInt("Age"));
print(tsv.toMap());
}