diff --git a/src/hipscat_import/catalog/file_readers.py b/src/hipscat_import/catalog/file_readers.py index fdfe34d..6b4c759 100644 --- a/src/hipscat_import/catalog/file_readers.py +++ b/src/hipscat_import/catalog/file_readers.py @@ -205,13 +205,12 @@ def read(self, input_file, read_columns=None): if read_columns: self.kwargs["usecols"] = read_columns - with file_io.load_csv_to_pandas( + return file_io.load_csv_to_pandas_generator( FilePointer(input_file), chunksize=self.chunksize, header=self.header, **self.kwargs, - ) as reader: - yield from reader + ) class IndexedCsvReader(CsvReader):