This is a general question. Suppose I have a huge csv file, with a column X
in it. Is there any way to read in only the rows whose values on column X
is in the list l= ['A' , 'C', 'Y']
?
For memory efficiency reasons, I would rather do this than read in the whole data and then subset.
Note: This question is not a duplicate as suggested. This question explicitly is about reading specific "rows" while the allegedly duplicate question is about reading specific "columns." Please pay closer attention before flagging a question as duplicate.