Extra lines in shaver_etal.csv

3 replies [Last post]
caseybergman
User offline. Last seen 37 weeks 4 days ago. Offline
Joined: 08/23/2016

Hi

Enjoying the book and using it for a course this semester. I noticed the shaver_etal.csv file has a large number of empty csv lines at the end of the file (see below, probably from Excel export). It might be worth removing these and repackaging the pcfb_examples.zip file, since these extra lines can potentially trip up students by giving inconsistent line count numbers and empty records in regex searches.

Best regards,
Casey

casey$ tail shaver_etal.csv
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,

pcfb
User offline. Last seen 5 days 7 hours ago. Offline
Joined: 08/04/2010
Shaver data inconsistencies

Hi Casey:

Thanks for taking the time to write...

The extra blank rows are part of the real-world data set, as downloaded from the scientist's web page. This is a common side effect when data are exported from a spreadsheet: all the unfilled cells at the bottom of the sheet get exported as well. We talk about this a little bit on page 73, but we are trying to prepare the reader to deal with this kind of file in their own lives. The work-throughs in the text should allow you to cope with the poorly formatted file in the end.

caseybergman
User offline. Last seen 37 weeks 4 days ago. Offline
Joined: 08/23/2016
I see, I missed this passage.

I see, I missed this passage. I understand the cause, and value of using this as a real-world example. Looking around a bit more, I see that ctd.txt is well-formatted .csv file in the examples directory. I'll use that for demos instead.

Thanks,
Casey

pcfb
User offline. Last seen 5 days 7 hours ago. Offline
Joined: 08/04/2010
CSV examples

Great.

Yes, there should be a few different kinds of files in there for demos, especially if you get into cut, sort,grep, etc.