Closed garlontas closed 5 months ago
Currently, we have a data loader for CSV files. It works by converting each data set (each row) to a namedtuple.
namedtuple
We need sth similar for YAML. Note that type conversion should be done as efficient as possible (see issue #63 for more information).
The loader should also handle non-consistent data, such as the YAML below:
- name: Joe Doe position: Vice President children: - name: Jim Doe - name: Kim Doe - class: Mammalia order: Carnivora family: Canidae genus: Canis
Here, a LazyFileIterable containing two differently structured namedtuples should be created.
LazyFileIterable
namedtuples
You can view the implementation for CSV here.
You can view the issue for the JSON loader here: #70
YAML data loader
Currently, we have a data loader for CSV files. It works by converting each data set (each row) to a
namedtuple
.We need sth similar for YAML. Note that type conversion should be done as efficient as possible (see issue #63 for more information).
The loader should also handle non-consistent data, such as the YAML below:
Here, a
LazyFileIterable
containing two differently structurednamedtuples
should be created.You can view the implementation for CSV here.
You can view the issue for the JSON loader here: #70