Describe the bug
The CSV loader isn't lazy. It reads the content from the CSV file directly at call.
To Reproduce
from pystreamapi import Stream
from pystreamapi.loaders import csv
stream = Stream.of(csv("/path/to/data.csv")) # CSV is already read here. This is time and memory consuming!
stream.filter(...).map(...).for_each(...) # The terminal operation should actually trigger the CSV reader.
Expected behavior
The CSV file should be only read when the iterable (return of csv() function) is accessed.
Describe the bug The CSV loader isn't lazy. It reads the content from the CSV file directly at call.
To Reproduce
Expected behavior The CSV file should be only read when the iterable (return of
csv()
function) is accessed.