Back to Blog
Python read csv skip first line6/13/2023 For example, my script runs, the last row successfully processed is row 500, and the number 500 is written to my other CSV file. In my script, I'm writing to another small CSV file the # of the row that was just successfully processed to where I have this as a reference if/when the script fails. The problem I'm having is that every now and then, something causes my Python script to fail and I've got to restart it and manually edit the initial CSV file of URLs to remove the rows containing URLs I've already processed so that the script resumes with what's the new first line containing the beginning of the next many URLs that I have yet to process. I'm iterating through each row, getting the unique URL, doing some processing on some data contained behind the URL once I open each unique URL, and writing some extended data to a 2nd CSV file. I'm working on a project where I have a CSV file containing about 25,000 rows of a unique URL in the first (and only) column throughout the CSV file.
0 Comments
Read More
Leave a Reply. |