How do I remove certain lines from a csv file in Python?

Asked

Viewed 44 times

1

I have a csv file, which contains several lines. Does anyone know what I should do to save to a new document, with some specific lines? One of the columns, 'yyyy', has data from 2015 to 2019. I would like to keep only the data for 2018.

Hugs

  • You could open one file for reading and another for recording, then making one for to read line-by-line read file would just make one if and write to the file only if you go through this if

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.