wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
5.9k stars 605 forks source link

csvlook: consider passing max_rows argument to agate.table.from_csv #1230

Closed morgan-dgk closed 4 months ago

morgan-dgk commented 5 months ago

Hello,

Currently max_rows is not passed to the row_limit parameter for agate.table.from_csv. As a result, the entire contents of the input file file is read even if a user requests to render the first 100 rows only.

Does this behaviour make sense? Why not just read the the number of rows of requested with agate?

jpmckinney commented 4 months ago

Ah, row_limit was added in 2021 and max_rows has existed a lot longer. But we can use it now!

Fixed in 7bba1bd