I need to skip some first lines from a CSV file and save it to another file.
The code i currently accomplish such tasks is:
import pandas as pd
df = pd.read_csv('users.csv', skiprows=2)
df.to_csv("usersOutput.csv", index=False)
and it works without issues. The only thing is: this code reads the whole file before saving. Now my problem is: i have to deal with a file with 4GB size and i think, this code will be very time consuming.
Is there a possibility to skip some first lines and save the file without to read it before?