I have a csv file which is too large to completely fit into my laptop's memory (about 10GB). Is there a way to truncate the file such that only the first n entries are saved in a new file? I started by trying
df = pandas.read_csv("path/data.csv").as_matrix()
but this doesn´t work since the memory is too small.
Any help will be appreciated!
Leon