import pandas as pd chunksize = [n] for chunk in pd.read_csv(filename, chunksize=chunksize): process(chunk) delete(chunk)