I have a huge dataset and I am trying to read it line by line. For now, I am reading the dataset using pandas:
df = pd.read_csv(\"mydata.csv\", sep =\',\', n
Looking in the pandas documentation, there is a parameter for read_csv function:
skiprows
If a list is assigned to this parameter it will skip the line indexed by the list:
skiprows = [0,1]
This will skip the first one and the second line.
Thus a combination of nrow
and skiprows
allow to read each line in the dataset separately.